asp.net mvc - What must I do to redirect to a Web Form from an MVC controller? -


i have line in controller:

response.redirect("~/webforms/reportviewer.aspx"); 

then simple test code in page_load of "reportviewer.aspx":

protected void page_load(object sender, eventargs e) {     response.write("hello");     return; } 

this code not execute, i.e. page_load not execute. suppose there i'm supposed before redirecting web form, have no idea is. have seen ample sample code plainly calls redirect.

my web form have crystal reports viewer on it, may have situation:

<body>     <form id="form" runat="server">         <cr:crystalreportviewer id="crystalviewer" runat="server" autodatabind="true" />     </form> </body> 

return redirect("~/webform.aspx"); 

is perfect , return type redirectresult , works awesome, have tested it.

my action this

    public actionresult print()     {         return redirect("~/webform2.aspx");     } 

thanks @andrey gubal


Comments

Popular posts from this blog

plot - Remove Objects from Legend When You Have Also Used Fit, Matlab -

java - Why does my date parsing return a weird date? -

Need help in packaging app using TideSDK on Windows -