
We may use data binding to fill lists with selectable items from an imported data source, like a database, an XML file, or a script. Data Binding The following controls are list controls which support data binding: asp:RadioButtonList asp:CheckBoxList asp:DropDownList asp:Listbox The selectable items in each of the above controls are usually defined by one [...]
Read More >>

Create an ArrayList The ArrayList object is a collection of items containing a single data value. Items are added to the ArrayList with the Add() method. The following code creates a new ArrayList object named mycountries and four items are added: <script runat=”server”> Sub Page_Load if Not Page.IsPostBack then dim mycountries=New ArrayList mycountries.Add(“Norway”) mycountries.Add(“Sweden”) mycountries.Add(“France”) [...]
Read More >>

Create a Hashtable The Hashtable object contains items in key/value pairs. The keys are used as indexes, and very quick searches can be made for values by searching through their keys. Items are added to the Hashtable with the Add() method. The following code creates a Hashtable named mycountries and four elements are added: <script [...]
Read More >>

The SortedList Object The SortedList object contains items in key/value pairs. A SortedList object automatically sort the items in alphabetic or numeric order. Items are added to the SortedList with the Add() method. A SortedList can be sized to its final size with the TrimToSize() method. The following code creates a SortedList named mycountries and [...]
Read More >>

We can bind an XML file to a list control. An XML File Here is an XML file named “countries.xml”: <?xml version=”1.0″ encoding=”ISO-8859-1″?> <countries> <country> <text>Norway</text> <value>N</value> </country> <country> <text>Sweden</text> <value>S</value> </country> <country> <text>France</text> <value>F</value> </country> <country> <text>Italy</text> <value>I</value> </country> </countries> Take a look at the XML file: countries.xml Bind a DataSet to a List Control [...]
Read More >>

The Repeater control is used to display a repeated list of items that are bound to the control. Bind a DataSet to a Repeater Control The Repeater control is used to display a repeated list of items that are bound to the control. The Repeater control may be bound to a database table, an XML [...]
Read More >>

The DataList control is, like the Repeater control, used to display a repeated list of items that are bound to the control. However, the DataList control adds a table around the data items by default. Bind a DataSet to a DataList Control The DataList control is, like the Repeater control, used to display a repeated [...]
Read More >>

JavaScript Form Validation JavaScript can be used to validate data in HTML forms before sending off the content to a server. Form data that typically are checked by a JavaScript could be: has the user left required fields empty? has the user entered a valid e-mail address? has the user entered a valid date? has [...]
Read More >>

A cookie is often used to identify a user. What is a Cookie? A cookie is a variable that is stored on the visitor’s computer. Each time the same computer requests a page with a browser, it will send the cookie too. With JavaScript, you can both create and retrieve cookie values. Examples of cookies: [...]
Read More >>

The Navigator object contains information about the visitor’s browser. Browser Detection Almost everything in this tutorial works on all JavaScript-enabled browsers. However, there are some things that just don’t work on certain browsers – especially on older browsers. Sometimes it can be useful to detect the visitor’s browser, and then serve the appropriate information. The [...]
Read More >>