Scrolling to an anchor

Bucky

Well-known member
Joined
Dec 23, 2001
Messages
791
Location
East Coast
User Rank
*Expert*
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 its
refreshed.

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

Code:
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 dont 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 doesnt have to scroll.
 
Thats what I was afraid of. I guess Ill rearrange the page and
put the form at the top.

Thanks Derek.
 
Back
Top