I have the following code in the code behind for a user control attached to a simple button click event. How do I avoid this cause an invalid postback? Its generating an Event Validation error.
protected void EditButton_Click(object sender, EventArgs e)
{
PopulateEditControls();
pnlEditDialog.Visible = true;
Page.ClientScript.RegisterStartupScript(
this.GetType(),
"navigate",
"window.onload = function()
{window.location.hash='#editDialog';}",
true);
}