I am using Response.Redirect(DropDownList1.Selected... The problem I am having is that it is appending this url to the url in my address bar on internet explorer. Is there anyway to maybe clear the address bar so when my new url is selected from the dropdownlist it will redirect to only that site? I have been stuck for two days now any help will be greatly apprehiated!!!!
Thanks,
Terry
With asp.net 2.0 I have a dropdown list linked to a access database. How to redirect to a new web site?
Well, the error lies in the DropDownList values. There is nothing else that would make the Response.Redirect method append anything to your redirected page.
Response.Redirect( "http://www.google.com" , false);
The above will redirect you to the google homepage.
Reply:Just put in the aspx page name..that would do !
Reply:Are the URLs in your DropDownList fully qualified (e.g., "http:///www.yahoo.com") or are they links to other pages within your web site (e.g., "Default.aspx")?
If the URLs are fully qualified, Response.Redirect shouldn't be appending to the existing address. If the URLs are links to other pages within your web site, I recommend using a syntax similar to the following:
Response.Redirect("~/" + DropDownList1.SelectedValue)
The "~/" tells the browser to look for the file in the root directory of your web site.
No comments:
Post a Comment