Thinking Websites


Monday 12 Apr 2010, 12:14 PM
ISAPI_Rewrite lets you easily create search engine friendly URL' s for your dynamic asp.net website.  It is an ISAPI module for IIS that mimics the rewriting abilities of the Apache webserver.

http://www.queenzone.com/forums/1226666/upcoming-video-project-queens-live-bloopers-the-sequel.aspx


RewriteRule ^forum[s]?/([0-9]+)/.+?.aspx /forums/f

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 asp.net 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 VB.net you exclude the path "Resources" when you refrence the resource.  This is different to C# whereby you include th

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.

Friday 09 Apr 2010, 01:30 PM
Perma Link | Comments (0)

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 fu

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

Friday 22 Jan 2010, 02:20 PM
The asp.net 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:

Perma Link | Comments (0)

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 t


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,


Saturday 28 Nov 2009, 10:29 PM
test blog entry 1
About Me View my profile
Syndication
rss feed

Home
Band
Talk
Information
Media
Members
About