Archive / HTML

RSS feed for this section

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 […]

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. […]