Let's say I have a webform and there are some labels, textboxs on it. The webform also has a gridview to read xml file. Let's say I type a wring file name:
protected void Page_Load(object sender, EventArgs e)
{
DataSet DS = new DataSet();
DS.ReadXml(Server.MapPath("~/wrongfilename.xml")); // raise an error
GridView1.DataSource = DS;
GridView1.DataBind();
}
and this is the page error handler:
protected void Page_Error(object sender, EventArgs e)
{
Exception ex = Server.GetLastError();
Server.ClearError();
}
so I actually handled this error and clear this error. So gridview has no data to display,fair enough. But the page is still a blank page when I execute the program, I think I should at least get textbox, labels displayed with a empty gridview, but it just a blank page. Why the page is not showing other components and how to display other components?