Archives for the 'ASP.NET' Category

Converting ASP.NET Web Applications from .NET Framework 1.1 to 2.0 and Above

When converting an ASP.NET web application from version 1.1 of the Microsoft .NET Framework to version 2.0 and above, the Visual Studio Conversion Wizard will convert your web application into what is termed a Web Site. In Framework 2.0 and above, ASP.NET apps come in two flavours: Web Site and Web Application Project [1]. The […]

16 April 2008 | Software engineering, ASP.NET | 1 Comment

Displaying the Column Headers of a GridView

The GridView of ASP.NET 2.0 will not display column headers if there is no data. The following is a workaround, assuming that you have added two BoundField columns to your GridView:
[C#]
DataTable dt = new DataTable();
dt.Columns.Add(”Description”);
dt.Columns.Add(”Amount”);
dt.Rows.Add(dt.NewRow());
GridView1.DataSource = dt;
GridView1.DataBind();
GridView1.Rows[0].Cells.Clear();
GridView1.Rows[0].Cells.Add(new TableCell());
GridView1.Rows[0].Cells[0].ColumnSpan
  = GridView1.Columns.Count;
The last two lines are not strictly necessary; I have included them so that the resulting HTML […]

22 November 2006 | Software engineering, ASP.NET | No Comments

ASP.NET 2.0: “Failed to initialize the AppDomain”

If you get a “Failed to initialize the AppDomain” error in the system event log when trying to run an ASP.NET application on .NET Framework 2.0 and Windows Server 2003, try giving IIS_WPG and ASPNET read and execute permissions to your directory.

7 November 2006 | ASP.NET | No Comments