We have in our master page a setup like this:
<a id="#SearchResults>
<asp:ContentPlaceHolder id="cphSearchResults" runat="server"/>
<a id="#Edit">
<asp:ContentPlaceHolder id="cphEdit" runat="server"/>
Then, in each page in our application, we put a radgrid in the search results place holder, and an edit control in the other. When we click a row in the search results grid, we invoke a process to look up that item, populate the edit control, and make the edit control visible.
What I'm trying to accomplish is to position the browser at my #Edit anchor after this postback, so the user is positioned right at the edit control.
No luck so far, I've tried several variations of this:
<a id="#SearchResults>
<asp:ContentPlaceHolder id="cphSearchResults" runat="server"/>
<a id="#Edit">
<asp:ContentPlaceHolder id="cphEdit" runat="server"/>
Then, in each page in our application, we put a radgrid in the search results place holder, and an edit control in the other. When we click a row in the search results grid, we invoke a process to look up that item, populate the edit control, and make the edit control visible.
What I'm trying to accomplish is to position the browser at my #Edit anchor after this postback, so the user is positioned right at the edit control.
No luck so far, I've tried several variations of this:
protected void grdTemplate_SelectedIndexChanged(object sender, EventArgs e)
{
if (grdTemplate.SelectedValue is int)
{
this.Presenter.Edit((int)grdTemplate.SelectedValue);
ClientScript.RegisterStartupScript(this.GetType(), "edit", "document.location = '#Edit';", true);
}
}
Thinking that after postback, the location would be set to the #Edit anchor by javascript. I don't see any evidence of this being in the page source after postback.
Anybody else have any ideas I might try?