Click here to Skip to main content
15,919,613 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hello

How to open pop up window in asp.net on button click....


thanks & Regards
Srishti
Posted

In client side you can do that by calling a js method like
C#
function alertpopup(){
alert('pop up');
}

call this method on client click of the button.
 
Share this answer
 
v2
Open a PopUp

To open a pop up window the JavaScript command is window.open()

Below is a function that opens a new popup window which accepts the url of the page to be opened.

JavaScript
var PopUpObj;

function popUp(url)
{
    PopUpObj = window.open(url);
    PopUpObj.focus();
}

example:
popUp("Default.aspx")
 
Share this answer
 
Comments
[no name] 16-Oct-13 2:51am    
can u tel, without using jscript in button_click.
Thank u.
[no name] 16-Oct-13 3:04am    
<input id="Button1" type="button" value="Open PopUp" önclick = "popUp('PopUp.aspx')" /><br />
[no name] 16-Oct-13 3:27am    
I mean,
In button_click,user registration is doing.after user registeration only popup need with user registered fields.
[no name] 16-Oct-13 3:39am    
have a look at this link "http://www.c-sharpcorner.com/blogs/4070/popup-window-using-javascript-in-asp-net.aspx"

And please explain purpose of your popuup
[no name] 16-Oct-13 3:40am    
For printing perpose.
XML
<script type="text/javascript">
        function basicPopup() {
            popupWindow = window.open("xsl2.aspx", 'popUpWindow', 'height=300,width=600,left=100,top=30,resizable=No,scrollbars=No,toolbar=no,menubar=no,location=no,directories=no, status=No');
        }
</script>
 
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