Could the MenuItemClick events happens before Page_Load events? Thanks a lot!
I have a menu on the top of page.
I set ViewState["dataTable"]=null; in MenuItemClick events.
My Page_Load events include some codes like this:
if (ViewState["dataTable"] != null)
{
dataTable = (DataTable)ViewState["dataTable"];
}
else
{
dataTable = null;
}
DataBind();
My expected action: Don't show GridView after click a new item of menu.
The actually result: It still show GridView after the first times click the new item of menu, the GridView don't show again after the second times click the new item in menu.
I track the code, menuItemClick events happens after Page_Load events, that's the reason.
How could I get my expected action and result?
Thanks a lot!