asp.net mvc - How can I Redirect to an MVC page from a Web Forms Site.Master page? -
we re-wrote half of our existing asp.net web application in mvc. in old site.master page call response.redirect("default.aspx") , update take user new mvc /home/index page.
i have tried these methods , both return "unable evaluate expression" exception...
response.redirect("/home/index") dim urlhelp new urlhelper(httpcontext.current.request.requestcontext) response.redirect(urlhelp.action("index", "home"))
any suggestions?
suppose have hosted application in iis name "myapplication" redirect this:
response.redirect("http://localhost/myapplication");
this automatically detects home controller , open index view. note: before testing make sure correct page opening while browsing: "http://localhost/myapplication"
Comments
Post a Comment