DeviceSpecificChoiceCollection.Add Method (DeviceSpecificChoice)

 

Adds a DeviceSpecificChoice object to the end of a collection. This API is obsolete. For information about how to develop ASP.NET mobile applications, see the www.asp.net/mobile Web site.

Namespace:   System.Web.UI.MobileControls
Assembly:  System.Web.Mobile (in System.Web.Mobile.dll)

public void Add(
	DeviceSpecificChoice choice
)

Parameters

choice
Type: System.Web.UI.MobileControls.DeviceSpecificChoice

The DeviceSpecificChoice object to add to the end of the collection.

The following code example demonstrates how to use the Add method to add a DeviceSpecificChoice object programmatically (with a filter named isCHTML10) to the form. This example is part of a larger example for the DeviceSpecificChoiceCollection overview.

// Add a DeviceSpecificChoice section programatically
protected void form1_Init(object sender, EventArgs e)
{
    DeviceSpecific devSpecific = Panel1.DeviceSpecific;
    DeviceSpecificChoice devChoiceHtml = new DeviceSpecificChoice();
    devChoiceHtml.Filter = "isCHTML10";
    devSpecific.Choices.Add(devChoiceHtml);
    ((IParserAccessor)form1).AddParsedSubObject(devSpecific);
}

.NET Framework
Available since 1.1

AddAt
Remove
DeviceSpecificChoice
DeviceSpecificChoiceCollection Class
System.Web.UI.MobileControls Namespace
Introduction to the DeviceSpecific Control
<DeviceSpecific> Element
<Choice> Element

Return to top
Show: