using response.redirect with a hash part

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
 
A

Aidy

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>
 
A

Andy Fish

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top