Monthly Archives: March 2011

Background image for a table row in IE7

Having this structure: <tr class=”current”> <td class=”project-number”> </td> <td> </td> </tr> .current {background-color: #dcdcdc !important; background: url(../images/current-item.png) no-repeat 0 0;} Class “current”  would display a “>” arrow to highlight the selected row, however IE7 displays the arrow on each table cell. The solution is to include a css just for IE7: <!–[if lte IE 8]><link [...]

Multi select DropDownList in ASP.NET

I needed a dropdown list that allows multi select, a sort of checkbox list paired with a dropdown. For example is very useful when working with months. MS Reporting Services has one. After googling for a while, I couldn’t find one to satisfy me and I started to play with a dropdown. A click on [...]

Cannot pass arguments to OnClientClick javascript

I want to give more information to the confirm dialog when the user deletes a record. I’m using an asp:LinkButton that can execute some javascript when the user clicks it, in the “OnClientClick” property. <ItemTemplate>      <asp:LinkButton ID=”lnkClose” runat=”server” CausesValidation=”False” data-number=’<%# Eval(“Number”) %>’ CommandArgument=’<%# Eval(“Id”) %>’   CommandName=”close” CssClass=”selected_item close-project”>Close     </asp:LinkButton> </ItemTemplate> Unfortunately, I [...]

Set active menu item

I have a menu and I need to highlight the menu item that loaded the current page. I tried to set server-side the id of the body to something unique and pertaining to the current page being loaded. Surprisingly, I could not get the page file name (or some other unique Id) but only the [...]

GridView, NHibernate and sorting

If you’re using an ASP.NET GridView with a custom DAL you might get this error when trying to sort the grid by clicking the column headers: The data source does not support sorting with IEnumerable data. Automatic sorting is only supported with DataView, DataTable, and DataSet. The web has some solutions to this problem, however [...]

Follow

Get every new post delivered to your Inbox.