Click here to Skip to main content
15,886,712 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I want to pop-up a new blank page to confirm user input. But how can I do it?

I want to do something like below:
C#
RedirectToAction("ConfirmPage", model, new { taget = "_blank" });


But it will get syntax error.

And also, how can I set up the size of the pop-up window?

Thanks.
Posted
Comments
Richard MacCutchan 25-Mar-15 4:19am    
What syntax error? Have you checked the documentation?
Iris Shing 25-Mar-15 4:20am    
the error is RedirectToAction didn't have RedirectToAction(string , object, object)

Quote:
the error is RedirectToAction didn't have RedirectToAction(string , object, object)
Yes, because it does not have that overload.

All the overloads are listed - Controller.RedirectToAction Method[^]. Use the one appropriate to your scenario.
 
Share this answer
 
Comments
Iris Shing 25-Mar-15 8:55am    
but there didn't have one
What exactly you are trying to do?
Iris Shing 26-Mar-15 21:23pm    
pop-up a new blank page to confirm user input, and there will show a report like table
Refer - I would like the return of an ActionResult displayed on a new page? Read the answer and try as suggested.

It says...

.NET cannot tell your browser to open a new window from the server, that is done client side via the HTML markup or javascript calls (eg. Window.Open).
in the view's javascript:
when click submit
JavaScript
$('#btnSubmit').click(function () {
           document.getElementById('form1').submit();
           window.open("/Booking/ConfirmBooking", '_blank', 'left=100,top=100,width=400,height=300,toolbar=1,resizable=1');
       });


Then it will open a window after click, but show data after controller binding.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900