[thelist] Using variables with Response.Redirect

Ryan Rushton me at ryanrushton.com
Fri Dec 23 12:01:04 CST 2005


I'm trying to replace a hardcoded string with a variable as follows:

// THIS WORKS //
private void validate() {
   Response.Redirect ("http://www.mysite.com/images/image.gif 
<http://www.mysite.com/images/image.gif>", true);
}

// THIS DOES NOT //
string baseURL = "http://www.mysite.com <http://www.mysite.com>";

private void validate() {
   Response.Redirect (baseURL + "/images/image.gif", true);
}

I'm new to ASP.NET ... could someone tell me what I'm doing wrong above?

-- Ryan






More information about the thelist mailing list