Forum guidelines
AuthorQuestion
How to display a popup window
Posted By Prashant More on 09 Jul 2008

Hello All,

I want to display a popup window when i click on a button.Please anyone send me the code.

 

Thanks & Regards

Prashant S. More


AuthorReply
Re: How to display a popup window
Posted By ramarajan ra on 09 Jul 2008  

hi.

try in this link, i found this and cleared my solution, try this link

http://forums.asp.net/tags/popup/default.aspx?PageIndex=5

 

regards

ram

 


Re: How to display a popup window
Posted By Niradhip Chakraborty on 09 Jul 2008  

You can do it by using javascript. Say your popup page name is 'ForgotPassword.aspx'
and your button id is 'btnGo'

 

.aspx page coding:

<script language="javascript">


      function OpenForgotPassword()
 {
  strUrl="ForgotPassword.aspx";
  x = window.showModalDialog(strUrl,"newwin","dialogHeight:20;dialogWidth:36; status:No; edge:Raised; center:yes; help:No; resizable:No; ") 
 }
</script>


.aspx.cs page coding
     
protected void Page_Load(object sender, EventArgs e)
   
 {
       
    btnGo.Attributes.Add("onclick","return OpenForgotPassword();");

       
 }


Regards,
Niradhip(James Hetfield)
MCP,MVC,MVP(Mindcracker)
--------------------------------------------------------------------------------------
Please remember to click “Do you like this answer” on the post that helps you.
Re: How to display a popup window
Posted By Ryan Alford on 11 Jul 2008  
or this will do it for the ForgotPassword.aspx page....

Response.Write("<script type=\"text/javascript\">window.showModalDialog('ForgotPassword.aspx',null,'status:no;center:yes;dialogWidth:500px;dialogHeight:300px;help:no;scroll:no');</script>");

Re: How to display a popup window
Posted By kareem elhosseny on 12 Jul 2008  
u can use this
it working with me

Response.Write("<SCRIPT>window.open('your page.aspx', 'Fame',  'scrollbars=yes, toolbar=no, location=no, directories=no, status=no, menubar=no, width=600, height=400', true</SCRIPT>");


K@reem Elhosseny

SPONSORED BY

Custom Software Development
MCN is your source for developing solutions involving websites, mobile apps, cloud-computing, databases, BI, back-end services and processes and client-server applications.