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
Post a Comment