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

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -