Wednesday, July 11, 2007

ASP.NET DataGrid ButtonColumn creating blank webpage

I encountered an odd bug while using Visual Studio 7.1.3088. Changing a datagrid's column type from BoundColumn to ButtonColumn turned the page to a white page with a lot of source code missing. The cause was for some reason code in the InitializeComponent was being erased.

private void InitializeComponent()
{
this.Load += new System.EventHandler(this.Page_Load);
}

was being changed into an empty function.

private void InitializeComponent()
{

}


Adding the code back in fixed the page.

0 Comments:

Post a Comment

<< Home