Scrolling to an anchor

Bucky

Contributor
Joined
Dec 23, 2001
Messages
791
Location
East Coast
At the bottom of a Web Form, I have a calendar control for (this
is really stretching it) choosing a date.

Whenever the calendar is clicked on, the page refreshes, but the
page is all the way back at the top of the page again when it's
refreshed.

I've created an anchor (calendar), but how can I scroll to it when
the page loads? I've tried

Visual Basic:
Private Sub clnNewDue_SelectionChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles clnNewDue.SelectionChanged
  Response.Redirect(Request.Url.PathAndQuery & "#calendar")
End Sub

when a date is selected, but no cigar. :(
 
In cross-page links anchors don't work as they should (at least in IE). The best suggestion I can offer to you is to keep the page-length relatively short, so the user doesn't have to scroll.
 
Back
Top