Tuesday, January 03, 2006

My ASP.NET form is many screens long. After user presses the button and the form is posted back to itself, I'd like to scroll it to the location where the button was pressed. What is the easiest way to achieve that?
You could use javascript, something like .scrollIntoView() for this.
string startupScript = @"";
Page.RegisterStartupScript("ReturnToAnchorAfterPostback", startupScript);

No comments: