ASP.Net Code, CSS Code, DHTML Code, JavaScript Code

Create a Scrolling Check Box List

If you are using the CheckBoxList control in ASP.Net, or you just have a bunch of options for users to check, a large number of check boxes options can take up a lot of room on your web page. Also, you may have a <select> with a lot of options, you need to allow multiple selects, but it also takes up a lot of room,...
ASP.Net Code, DHTML Code

Use a DHTML Slider on Your ASP.Net Page

I found this great free DHTML slider, completely styled with CSS code, no images required. However, as with all XHTML objects, it is stateless. So when used in an ASP.Net application, it doesn't retain the value across postbacks, and goes back to the beginning on the slider position each time. Here's the code to store and retrieve the values.
ASP.Net Code, JavaScript Code

Open a New Browser Window From an ASP.Net Server Control

All ASP.Net controls add functionality to your web application by performing postbacks to the server. When they post back, their events are captured by the web server. So if you add an onclick event to a button, it will be a server-side event. But what if you need a button to open a window or JavaScript prompt when you click on it? This is a...
ASP.Net Code

ASP.Net – Get Longitude & Latitude for a Canadian Address

This is a code snippet from a 'gecode' class I wrote in C#. This is the portion that retrieves the longitude and latitude for either a postal code or an address of some sort. The function retrieves the co-ordinates via a web request (WebRequest) to The response from is then loaded into an XmlDocument, and parsed.
ASP.Net Code

ASP.Net – Get All Selected Items in a List (ListBox) Control

With ASP, you could retrieve all selected values of a select list by parsing the QueryString. Now that ASP.Net is object-oriented and all controls are stateful however, there is a much more reliable method to retrieve the value (or text!) of each selected item in any list control (ListBox, CheckBoxist, RadioButtonList). This code snippet will also illustrate how to insert each item as a unique...