using response.redirect with a hash part

  • Thread starter Thread starter Andy Fish
  • Start date Start date
A

Andy Fish

hi,

if I do this:

Response.Redirect("mypage.aspx?some-url-params#bookmark")

it seems that the bookmark gets lost - the address bar doesn't show it and
the browser stays at the top of the page

is this because the 302 redirect protocol doesn't support the "hash" part of
the url, or a bug in .net, or something funny with the specific URL I am
using?

TIA

Andy
 
Works ok for me, .net handles the redirect ok (response generated below).
Might be something about the target page

HTTP/1.1 302 Found
Server: Microsoft-IIS/5.1
Date: Wed, 21 Nov 2007 14:35:01 GMT
X-Powered-By: ASP.NET
X-AspNet-Version: 2.0.50727
Location: /Site/test2.aspx?id=123#test
Set-Cookie: ASP.NET_SessionId=4nwlho45kpfeoojtgmz1iq55; path=/; HttpOnly
Cache-Control: private
Content-Type: text/html; charset=utf-8
Content-Length: 151

<html><head><title>Object moved</title></head><body>
<h2>Object moved to <a href="/Site/test2.aspx?id=123#test">here</a>.</h2>
</body></html>
 
hmm, thanks for that

I had suspected that if this usually happened there would have been a lot
more forum posts about it

I'll have another dig and try to figure out just what's going on then

Andy
 
Back
Top