There are two reasons why it is desirable to do so. The first is for letting search engines see more of your content rather than the big portion of ViewState many sites have. The other is perceived rendering time, which...
The W3C has introduced an API for their HTML Validator. It is not a SOAP web service, but it does return XML that can be parsed, so now you have the ability to incorporate validation to any web application, Windows...
The Session in ASP.NET is a very simple way of storing user specific data for the duration of a single user session. I’ve many times added data to the Session that had an even shorter lifespan. That could be as a data...
For a website that supports multiple languages, it is important to tell the client what the selected language is. This is done in the <html> tag in the lang or xml:lang attribute and could look something like this for an...
For security reasons Microsoft doesn’t allow invisible columns in a GridView to be posted back like it does in the old DataGrid. That makes it impossible to store the ID of the row in an invisible column and then use it...
The easiest way to make a redirection in ASP.NET is using Response.Redirect(url). What it actually does is, that it creates a response with the “302 (Object Moved)” status code and the target destination. It tells the...
We probably all know about the annoying captcha images that a lot of blogs uses for separating humans from machines (spam robots). I use a captcha image to avoid comment spam on this blog because I get a lot, but I...
Since ASP.NET 1.0 you had the ability to toggle the visibility of any HTML tag with the runat=”server” attribute. The only prerequisite is to add the runat=”server” and ID attributes, but that is not always possible or...
ASP.NET 2.0 introduced the CompilationMode attribute to let the developers decide how to compile individual pages, user controls and master pages. You can set the value to these three values: Always Auto Never This is...
I recently built a JavaScript function in HeadLight that filled a textbox from JavaScript and then disabled the textbox to prevent the user to alter its contents. When the form was submitted, it didn’t submit the...