HtmlControls Examples

HtmlSelect and selected items

The following example will submit a HtmlSelect control to the server. You can select multiple options using SHIFT or CTRL. If you click on Submit you will get a message box which gives you the item values that are selected through an Ajax.NET method.

Click Submit

HtmlSelect parent-child updates

In most web sites you'll find dropdown lists that have some parent-child dependencies. With Ajax.NET you can simply return an HTML control to be placed into a placeholder:

Please select from the left list first!

HtmlSelect passing to the server and back

The next example will send the HtmlSelect control to the server, append one element and go back to the client. Notice that the selection you have done will still be there.

Click here to append one new element at the server-side code.

Valid XHTML 1.0 Transitional