execute window.open without a button pressed?

  • Thread starter Thread starter cgia
  • Start date Start date
C

cgia

I would like to return error message in a pop up window. Window.open
would be great, but it can only be associated to the onclick event of
the button: button.Attributes.Add("onclick",...

Any ideas?

I thought of creating a invisible button on the form, pressing it
programmatically, and hopefully this will fire the event above.
Any other ideas?

Thanks
 
In Javascript you can use this script :

<script language="javascript">
window.open('error.aspx', 'error', '....');
</script>

whene browser parse this script popup is opened!

if you want to generate this script from server code for make it dinamically
you must use Page.RegisterClientScriptBlock method.

Brun
 
Back
Top