Click here to Skip to main content
15,885,546 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi

i want to open a partial view in window.open() java script method

like: window.open('/docs/Calculator/Calculator.html', "PopupWindow", 'width=500px,height=500px,top=150,left=250');

how it possible pls help me
Posted

create a controller or you may be you have already created as

SQL
public PartialViewResult ShowPopup()
        {
            return PartialView();

        }

ShowPopup is yor page name.

pass url as
window.open('@Url.Action("ShowPopup", "PopupController")', "PopupWindow", 'width=500px,height=500px,top=150,left=250');
 
Share this answer
 
I solve it

window.open('@Url.Action("ActionName", "ControllerName")', "PopupWindow", 'width=500px,height=500px,top=150,left=250');
 
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