CSS Friendly Adapters and Skins

ASP.NET CSS Friendly Control Adapters http://www.asp.net/CSSAdapters/ http://www.codeplex.com/cssfriendly I guess this exists because Microsoft realizes that some of its rendered HTML code are not that easy to apply CSS to. So this adapter comes and stands in the way of the rendering process to generate different sets of HTML. It’s pretty cool because at the very … Continued

Random Password Generation

Pretty cool, can be used for many purposes, like generating the decryption and validation machine keys, etc… https://www.grc.com/passwords.htm By Bryan Xu

Select a row on GridView

There are many ways to select a row and perform whatever actions you desire in GridView. The easiest is to let its CommandField generate the select button and use the SelectedIndexChanging and SelectedIndexChanged events for the actions desired. <asp:CommandField ShowSelectButton=”true” /> However, it would be more elegant if you can just select the row. 3 … Continued

Server.HttpEncode vs. HttpUtility.HttpEncode

Just use HttpUtility.Encode because Server.HttpEncode simply calls HttpUtility.Encode. Basically if you are trying to display text back to the user and these text are either straight from database, or from databound objects, or from current page textbox entered by user, etc, use HttpUtility.Encode, mainly to prevent script-injection and handle specials characters such as blanks and … Continued

ASP.NET AJAX username availability check

ASP.NET AJAX username availability check with UpdatePanel ASP.NET AJAX username availability check without UpdatePanel I used UpdatePanel in our project and it works alright. I didn’t read either of these posts when I did it. It was not too hard to figure out even though I did remember myself having some issues. However, the web … Continued