I have an update panel that has a button with a handler:
protected void btn_Click(object sender, EventArgs e)
{
ScriptManager.RegisterStartupScript(Updater, this.GetType(), "Hash Update", "UpdateServerData('" +
avalue + "');", true);
}
and a javascript function:
function UpdateServerData(val) {
parent.location.hash = val;
}
The first time I click the button after the page loads, the value is written to the location. hash, but is cleared out. The next click functions the way it should. I can’t figure it out. Any help appreciated.
Go it. Apparently there is a bug in .Net 3.5 with partial postbacks that removes the Hash. the answer was here http://magnuskragelund.dk/url-with-hash-mark-changing-after-partial-postback/
thanks for your help though.
Charles