Dynamicweb 8 Documentation
Item Property (PaymentCollection)
Example 

The index.
Gets the element at the specified index.
Syntax
'Declaration
 
Public Shadows ReadOnly Default Property Item( _ 
   ByVal index As Integer _ 
) As Payment
public new Payment this[ 
   int index 
]; {get;}

Parameters

index
The index.
Example
class MyPage : System.Web.UI.Page
{
   public String GetPaymentData() 
   {
       System.Text.StringBuilder payStr = new System.Text.StringBuilder();

       payStr.Append("<table>");

       PaymentCollection payments = Payment.getPaymethods();
       for( int i = 0;i<payments.Count;i++ )
       {
           Payment pay = payments.Item[i];
           String checkedStr = "";
 
           if( pay.CountryRelation(countryID).IsDefault )
               checkedStr = "CHECKED";
           else
               checkedStr = "";
 
           payStr.Append("<tr>");
           payStr.Append("<td><input type=""radio"" value=""" + pay.ID + """ " + checkedStr + ">" + pay.Name + " - " + pay.Description + "</td>");
           payStr.Append("</tr>");
       }

       payStr.Append("</table>")

       return payStr.ToString();
   }
}
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

PaymentCollection Class
PaymentCollection Members

Send Feedback