Reputation: 187
I am using something like
server.transfer("~/student/Language-Certificate");
in a click event. but I get this error "Error executing child request for /Students/Language-Certificate."
note: from code behind something like this
MenuItem country = new MenuItem();
country.NavigateUrl = "~/Admin/Country/Add";
works fine.
how to use routes with server.transfer so that it redirects properly to the clean url address ?
Upvotes: 1
Views: 1009
Reputation: 187
I have used
Response.RedirectToRoute("NameOfTheRoute");
and it works fine.
thanks to : http://www.dotnetfunda.com/articles/article1450-aspnet-40-routing.aspx
Upvotes: 1