Recent Lessons


Rss Lessons

Rss Blog


ISAPI_Rewrite Common Regular Expressions

Monday 12 Apr 2010, 12:14 PM

ISAPI_Rewrite lets you easily create search engine friendly URL' s for your dynamic website.  It is an ISAPI module for IIS that mimics the rewriting abilities of the Apache webserver. RewriteRule ^forum[s]?/([0-9]+)/.+?.aspx /forums/forum_topic_view.aspx?Q=$1&%{QUERY_STRING}  [NC,L]

Server controls, embedded resources and

Saturday 10 Apr 2010, 12:8 PM

I had a problem for quite some time when i was trying to include external resources within server controls.  When creating an server control, you may want to include some additional resources in your assembly, such as javascript or images. Typically, you plaec these in the "Resources" directory.  However, when referencing this directory in you exclude the path "Resources" when you refrence the resource.  This is different to C# whereby you include the "Resources" in

Date with select drop down

Friday 09 Apr 2010, 01:38 PM

If you need to choose dates that are quite a long way off, the typical "calendar" control isn't very practical as you would need to scroll through many, many years.  You could provide a "free form" input, but you want to guarantee a valid date input. A solution is a date input with a drop down control.  To get the inputed date, simply access the "value" attribute of the control.

Link with filesize and icon

Friday 09 Apr 2010, 01:30 PM

 <RO:Link ID="Link1" runat="server" DownloadMessage="Listen"  QueryValue='19' filename=''  filesize='100098'  UrlAuthorized="/general/download-file.ashx?q={0}&type=1"></RO:Link>  This control simply creates a link to a file along with a filesize message and an icon. 

Searchable Select Element Asp.Net Control

Tuesday 26 Jan 2010, 04:28 PM

The standard select list takes each keystroke as the "letter" or "number" to search for.   This isn't particularly nice when you have a long list of items in a select or drop down list. In the case of a list of countries, searching for "Australia", the "a" i type shows the countries beginning with "a", when i type the "u", i am presented with the countries starting with "u". This server control extends the standard htmlselect control and adds JQuery search functions to the text

Contact form Asp.Net Control

Friday 22 Jan 2010, 02:34 PM

The contact form controls creates a "standard contact form" that is found on pretty much every single website.  The idea is to encapsulate this standard element in a single server control - in a similar way to the login control does for login / membership functions. The form element labels and styles can be modified.  You can also choose to include a subject field or not.  Collecting the values of the form is then pretty easy. The code for instantiating the contact form control is:

Autocomplete Asp.Net Control

Friday 22 Jan 2010, 02:20 PM

The control queries a webservice for information based upon the entry into a textbox. The code for setting up the autocomplete control is simple.  An example looks like: <RO:AutoComplete ID="myAuto" runat="server" WebserviceUrl="/ajax/lyric.ashx"></RO:AutoComplete> There are some additional options, such as number of characters to require before requesting informat

Not showing a datagrid when there are 0 records

Wednesday 06 Jan 2010, 03:25 PM

When populating a datagrid you will often use a datareader as it is the fastest way to pull data out of a database. In the case where there aren’t any records, though, this may leave you with an “empty table”, where the columns are showing, even though there is no data. The datareader doesn’t provide a record count of the returned records – so you aren’t able to “show / hide” the table based on the number of returned records. There is a simple way of avoiding this, by counting

Including JavaScript and Images in an server control with VB.Net

Wednesday 06 Jan 2010, 03:23 PM

There is a differnce between VB.NET and C# when including external resources in a server control. This is of particular notice to those using VB.Net. When including JavaScript or images within your custom server control, you will no doubt add a “Resources” folder to your project. However, when including a reference path to the items in the resource folder, you do not include a reference to the “Resources” folder – when using VB.Net. For example, in my UI library project

Test blog entry

Saturday 28 Nov 2009, 10:29 PM

test blog entry 1

Free Web Development Courses

  • 1

Privacy Policy