can I popup page form server side?

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

Guest

I have a small (feedback) page in asp.net 1.1.

Is it possible to cause a page to be opened in another window in respose to
a post from another aspx page? Is there something I can do in the page
itself (either aspx or code behind) to cause it to be popped up in a new
window? I'm aware of target=_blank when I actually have a link.

Is there a way to adjust the size of the displayed window?? Does it need to
be javascript on onload?

Thanks
 
The only way to popup a window is to make a javascript call to
showModalDialog. You can specify the size in the call parameters.

You can't directly call it from server side, but you can pass a request from
server side to client side in a hidden input control. The client code can
access the control value and understand that a popup should be shown.

For example, on the server side you will have
inhAction.Value = "SHOWPOPUP";

and on the client:
function checkAction(){
if (myForm.inhAction.value=="SHOWPOPUP")
showModalDialog(...);
}
<body onload=checkAction()>
....
<input type=hidden runat=server id=inhAction />

Eliyahu
 

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

Back
Top