How to show a pop-up window on the page?

  • Thread starter Thread starter lichaoir
  • Start date Start date
How to show a pop-up window on the page?
Thanks for your answer and discussion.

Do you mean a popup window showing the 'ErrorMessage' property from a,
for instance, RequiredFieldValidator ?

Try using the 'showMessageBox' property on a ValidationSummary
object.

If you're looking for a more general type of popup (ie 'Do you really
want to do this' type thing) you might find this forum thread
useful ...

http://tinyurl.com/2n3nac
 
How to show a pop-up window on the page?
Thanks for your answer and discussion.

Or you can assign a javascript function on the onclick event.

Example
-------------
using System.Text;

public void ButtonConfirmar1_Click (object sender, EventArgs e)
{

StringBuilder script = new StringBuilder();

script.AppendFormat("<script language='javascript'>");
script.AppendFormat("window.open('http://www.microsoft.com/',
'_new');");
script.AppendFormat("</script>");

Page.RegisterStartupScript("submitForm", script.ToString());
}

Bye!
 
Back
Top