Window.open javascript

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

HI,
I would like to open a popup window on my web application when a user click on a button, BUT ONLY AFTER executing a C# routine that checks for some value.
There is any method to do that?
Thank you,
Fabrizio
 
What you could do is to run your c# code during the postback and simply have
a condition that, if true, would write some script to the browser using the
method RegisterClientScriptBlock or some similar methods. When the page is
rendered, the script will execute if present, otherwise nothing will happen.

Fabrizio said:
HI,
I would like to open a popup window on my web application when a user
click on a button, BUT ONLY AFTER executing a C# routine that checks for
some value.
 
Sorry
i'm not sure i understand when the javascript has to be created
Do you have any example on line to address me to
thank you
 
hi Fabrizio
you can create this script at run time on the server , make the
creation of this script occur on some event handler whose event is only
raised when your c# code is executed . so you create the script on the
server ( upon some condition you set) and send this script on a response
to be exceuted on the clinet server . this response however should be
invoked ( should be done by event ) only when your c# code has executed.
hope that helps
Mohamed Mahfouz
MEA Developer Support Center
ITworx on behalf of Microsoft EMEA GTSC
 
Back
Top