execute window.open without a button pressed?

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
 
B

Bruno Sirianni

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top