Thursday, November 30, 2006
Wednesday, November 15, 2006
ASP.NET 2.0 Tip: 'Theme' is not a member of 'ASP.default_aspx'
Ever had an error like 'Theme' is not a member of 'ASP.default_aspx' on ASP.NET 2.0, like I had just now? The point was that there was no problem at all with the Theme, it always worked as it should. What indeed was the point was a long time ago I changed the default.aspx page name into something more useful. But.. the Page directive keeps saying
1 <%@ Page Language="VB" AutoEventWireup="false" Inherits="_Default" %>
for reasons still unbeknown to me it turned out quickly this was fine on my (WinXP/IIS5) local machine, but not on the test server (Win2003/IIS6) on which I published the project. It came up with the above error.
Hope this helps you out someday.
Tuesday, November 07, 2006
ASP.NET 2.0 Tip: How To Get The RowIndex When You Press An ASP:Button in a GridView
Finding out the above took me quite some time. It's not standard behavior to have a gridview with multiple row, with all rows having a configurable number of Textboxes on which data entry can be done, and that stores the data back to the underlying datasource with a 20+ parameter stored procedure, containing all fixed entries from the specific row.
Are you still with me? Well, put a bit simpler, I needed the rowindex of the specific row that was pressed. At first I thought well, that must be Gridview1.Rowindex, wouldn't it? but this turned out to be not the case. That is, the rowindex was not known inside the RowCommand event. After *a lot* of Googling it turned out I needed to add a CommandArgument to the Button, like so:
46 <asp:Button ID="updateDB" runat="server" CausesValidation="false" CommandName="updateDB"
47 CommandArgument="<%# CType(Container, GridViewRow).RowIndex %>" Text="updateDB" />
Simple enough if you've seen it before, but not so obvious to me...
Thanks to an asp.net forum thread and Mr DataAccess in ASP.NET himself Scott Mitchell (at the bottom)
Thursday, November 02, 2006
LINKBLOG for November 2, 2006
One of those things that have more impact than you'd realise at first sight
»
Floating annotation for web-based applications. Post-It's for you ASP.NET application Code Project
Floating annotation for web-based applications. Post-It's for you ASP.NET application Code Project
»
.NET Framework, Source Code and Debugging Mike Taulty's Blog. Mike misses not having .NET Framework source code avaliable when debugging
.NET Framework, Source Code and Debugging Mike Taulty's Blog. Mike misses not having .NET Framework source code avaliable when debugging