views:

105

answers:

1

Hi,

Please can someone tell me how i can call a jquery popup window from code behind in asp.net3.0?

I have already downloaded a plugin that opens an IFrame as a popup, but I need to pass a string value in the url of the IFrame and that string value is constructed at the code behind on click of the same button from which the popup will open.

Please advise

Thanks Amit

+1  A: 

You'll have to register a startup script on the page:

Page.ClientScript.RegisterStartupScript(this.GetType(), "SomeKey", 
    "<script type='text/javascript'>ShowPopup()</script>");
GenericTypeTea
+1; Although I'd use `Page.ClientScript.RegisterStartupScript(this.GetType(), "SomeKey", "ShowPopup()", true)`, without having to directly specify the `script` tag in the string ( [the last parameter indicates to add the `script` tags](http://msdn.microsoft.com/en-us/library/z9h4dk8y.aspx) )
Giu