Inside of your page directives, the aspx page, use the
SmartNavigation=True directive.
Example: <%@ Page Language="vb" AutoEventWireup="false"
Codebehind="yourPage.aspx.vb" Inherits="yourProject.yourPage"
SmartNavigation="True"%>
This will do all of the dirty anchor work for you when postback is
caused by an asp.net control.
Happy Coding!
Bobby Ryzhy <bo***@weekendtech.net> wrote in message news:<e7********************************@4ax.com>. ..
On Mon, 26 Jul 2004 17:01:21 +0200, "Lars Netzel" <[stop_spam]@host.topdomain> wrote:
Hello!
I have a LOOOOONG page with a bunch of panels that you can expand and
stuff.. and as you all know when you click on a servercontrol and get a
postback, it reloads and you end up at the top of the page ... is there
anyway to get the postback to add a #anchorname to the Address so I can keep
my location down in the page??
Regards
/Lars
You can try some javascript -
C#
if (IsPostBack)
{
Page.Controls.Add(new LiteralControl("<script language = \"javascript\">"));
Page.Controls.Add(new LiteralControl(window.location="abc.aspx#123));
Page.Controls.Add(new LiteralControl("</script>"));
}
Bobby Ryzhy
bobby @ domain below
http://weekendtech.net