tropico 0 Newbie Poster

Hello,

I'm experiencing some strange behavior with hashes in the URL and trying to do a redirect. See the following code below:

// Test.aspx.cs
protected void Page_Load(object sender, EventArgs e)
{
    Response.Redirect("http://www.yahoo.com");
}

If I hit Text.aspx directly, I go to http://www.yahoo.com as expected...

But if I hit Test.aspx#asdf then I'm taken to http://www.yahoo.com/#asdf

Anyone have any ideas why this happens?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.