Dynamicweb 8 Documentation
Item Property (ShippingCollection)
Example 

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

Parameters

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

        shipStr.Append("<table>");

        ShippingCollection ships = Shipping.getShippingmethods();
        for( int i = 0;i<ships.Count;i++ )
        {
            Shipping ship = ships.Item[i];
            String checkedStr = "";
 
            if( ship.CountryRelation(countryID).IsDefault )
                checkedStr = "CHECKED";
            else
                checkedStr = "";
 
	           shipStr.Append("<tr>");
            shipStr.Append("<td><input type=""radio"" value=""" + ship.ID + """ " + checkedStr + ">" + ship.Name + " - " + ship.Description + "</td>");
            shipStr.Append("</tr>");
        }

        shipStr.Append("</table>")

        return shipStr.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

ShippingCollection Class
ShippingCollection Members

Send Feedback