Archive / HTML

RSS feed for this section

Line Breaks in ConfirmButtonExtender

I expected to type \n into the ConfirmText property of the AJAX Control Toolkit’s ConfirmButtonExtender and get a new line. This doesn’t work, but you can use this character code: 
 Specifically, ampersand pound ten semicolon.

Binding jQuery events to ASP.NET controls in an UpdatePanel

Controls inside an ASP.NET UpdatePanel cannot be bound to jQuery events after a partial postback. Here are some tips using pageLoad():

ASP.NET MultiLine TextBox MaxLength Validation

There have been many articles and forums addressing the fact that the MaxLength property of the ASP.NET TextBox does not work when you set TextMode to MultiLine. The majority of these solutions use the KeyPress and OnBlur events. This brings with it lots of JavaScript and a host of browser issues. I was impressed by […]

jQuery Get Next Textbox in a GridViewRow

In a GridView I have a column of checkboxes and a column of textboxes. I wanted to modify the value of the textbox when the checkbox is checked. jQuery is the perfect fit for this. Here is the code I used: $(function () {     var $inp = $('input:checkbox');     $inp.bind('click', function () {         […]

How to Make Favicons with Visual Studio

I don’t have any fancy program to generate an icon. Since I always forget how to do this, here are simple instructions: Open the logo in Photoshop and flatten it to one layer on a transparent background. Duplicate it and resize to 16×16 pixels. Open a new instance of Visual Studio and click New File. […]

GridView Row Index in Markup

Sometimes I want to show the e.Row.RowIndex of a GridViewRow in the markup of the page. I don’t want to hook into the RowDataBound method just to display a simple number. The answer varies for GridViews and Repeaters. Click here for the complete rundown. GridView: <asp:Literal runat="server" Text='<%# Container.DataItemIndex + 1 %>' /> Repeater: <asp:Literal […]

HTML Email CSS Guide

This guide is a must use for sending HTML email newsletters:

Truly Understanding ViewState

I was having some troubles with large ViewStates, so I found this article. It does an excellent job of explaining the inner workings of ViewState, and some of the common ways to misuse it. – Zachary

IE6 Float Bug

Lots of people like CSS and it certainly has it’s place. But when the most popular browser has a bug that prevents a simple div element from displaying properly we all get frustrated. All I wanted to do was have a box “float” to the right side of the page. It works great in IE7 and Firefox. […]