Hi,
I have a web form which contains a user control. The user control has a GridView. When a row is selected I need the data in the selected row to be passed to the web form and then for the web form to run its load event. To do this I created a public property in the user control and set the value of the property in the GridView's SelectedIndexChanged event. The idea is that the parent form can then reference the user controls public property.
I am finding however that the forms load event runs before the SelectedIndexChanged event. Is there any way to change this?
The code I have is as follows in the user control (only relevant parts added):
public BaseObject obj
{
get
{
if (ViewState["obj"] == null) ViewState["obj"] = null;
return (BaseObject)ViewState["obj"];
}
set { ViewState["obj"] = value; ...
Go to the complete details ...