Response.Redirect issue


Joined
Sep 15, 2012
Messages
1
Reaction score
0
Hello,

I'm actually starting to think this may be an IIS issue, but figured I'd ask here first.

I have a website that has a search link in the master page that opens up a modal popup. The user enters a zip code and a range that they want to search and clicks go. The onclick event has only 1 line of code:
Code:
Response.Redirect(string.Format("~/Default.aspx?z={0}&r={1}", txtFindZipCode.Text, ddlRange.SelectedValue.ToString()));
This works great everywhere in the website in development and everywhere in production EXCEPT for when the url just contains the host (e.g. http://site.com)...

If you do a search and the only thing in the address bar is the host then all that happens is the site redirects back to that url (it goes back to http://site.com instead of http://site.com?z=20110&r=50)

If the domain ends with Default.aspx then it works great. So if I'm at http://site.com/Default.aspx it'll work but http://site.com/?a=b or http://site.com# doesn't work. That leads me to think it's an IIS issue, but was wondering if anybody else has had this issue before.
 
Ad

Advertisements


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