---------------in page load ------------------------------------------------------------------------
//craete view stat object carry the selected data on dropdownlist
ViewState["DropDownList3"] = DropDownList3.SelectedValue;
--------------------------in the event button ---------------------------------------------------------
protected void DetailsView1_ItemUpdated(object sender, DetailsViewUpdatedEventArgs e)
{
// on the event fire now will refersh the dropdown datat and keep the state view
DropDownList3.DataBind();
if (ViewState["DropDownList3"] != null)
{
DropDownList3.SelectedValue = ViewState["DropDownList3"].ToString();
}
}
No comments:
Post a Comment