
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 >>

JavaScript Timing Events With JavaScript, it is possible to execute some code after a specified time-interval. This is called timing events. It’s very easy to time events in JavaScript. The two key methods that are used are: setTimeout() – executes a code some time in the future clearTimeout() – cancels the setTimeout() Note: The setTimeout() [...]
Read More >>

JavaScript Objects Earlier in this tutorial we have seen that JavaScript has several built-in objects, like String, Date, Array, and more. In addition to these built-in objects, you can also create your own. An object is just a special kind of data, with a collection of properties and methods. Let’s illustrate with an example: A [...]
Read More >>