Wednesday, June 4, 2008
Response.Redirect ResolveUrl fails
I had a Response.Redirect fail today. The url was something like this: "~/blah/blah.aspx?id=5&time=3:30". Response.Redirect, when it sees the "~" character, does a ResolveUrl() call under the hood. That's really what was failing. It wouldn't resolve my url, so I kept removing parameters until it worked. It was choking on the ":" character.
The solution was to do a myUrl.Replace(":","%3A"). I don't know why it can't handle the ":" and wonder if there are other characters it has a problem with.
Labels:
Web Development
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment