|
-
Nov 4th, 2003, 05:40 AM
#1
Thread Starter
Frenzied Member
Response.redirect and anchors
I have an anchor near the bottom of a page just before a placeholder where error messages are displayed. After the Error message is placed in the placeholder i want the page to go to that anchor.
VB Code:
'Spamming so do this!
turnControlsOff()
connection.connect(Application("SQLServerAddress"), objConn)
messages.DisplayMessage(plhMessage, 12)
Session("returning") = True
connection.Disconnect(Application("SQLServerAddress"), objConn)
Response.Redirect("msgboard_topic.aspx#Error")
In the above code messages.displayMessage places a label with an error message into a placeholder, without using the response.redirect the Error message is displayed and is persistent during refreshes and stays in place if i manually enter msgboard_topic.aspx#Error in the url address bar.
But when i try and use response.redirect the page moves to the anchor but the message isn't displayed.
Any ideas?
-
Nov 4th, 2003, 01:02 PM
#2
It's doing that because Response.Redirect is reloading the page.
Perhaps use inline javascript:
Code:
<%
turnControlsOff()
connection.connect(Application("SQLServerAddress"), objConn)
messages.DisplayMessage(plhMessage, 12)
Session("returning") = True
connection.Disconnect(Application("SQLServerAddress"), objConn)
%>
<script language="javascript" type="text/javascript">
window.location.hash = "Error";
</script>
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|