How to open a popup window from C# code behind

Hi, When users click on submit button on my application, first it validates the data using requiredfieldvalidators, and then once all the data is perfect a popup window should open that tells them "please wait, processing request", the window stays as long as the parent unloads, I am able to do it by using Javascript and adding OnClick attribute to the button, but the problem is the popup opens everytime we click the button, even if it it fires the validators and not move to the next page, 

Can Anyone Help??
6/21/2006 10:28:53 PM
📃 24353 articles.

💬 18 Replies

How about adding the popup code to the onsubmit event handler of the
form tag instead?  Of course that assumes that your users will
have Javascript turned on and be able to use client-side validation,
and that there are no postbacks until then...

Additionally, I might suggest using an inline bit of HTML rather than a completely separate window, due to the widespread use of popup blockers -- but if you have a more controlled environment, this might not matter.

Peter Brunone
Do the impossible, and go home early.
6/22/2006 5:45:37 AM

How about something like:
protected void Test_Click(object sender, EventArgs e){
public void OpenNewWindow(string url)
   ClientScript.RegisterStartupScript(this.GetType(), "newWindow", String.Format("

Similar Artilces:

open a popup window code behind
how to open popup window through javascript in code behind( popup window should be aligned center)
Open popup window on click of button event from code behind side
Javascript confirm message in c# code behind,by clicking ok popup window open
Atlas client side control value available to server side C# code behind
open popup window from code behind
opening multiple popup windows from code behind
Want to open a popup window from code behind
javascript in c# code behind for
C# code behind variable in client side javascript
How to access yes/no value from a popup window in the code-behind C#?
Using C# code behind to open a new Internet Explorer window
Opening POPUP Windows from C# Windows application
Question about client side and code behind code
execute '' client script function in server side code
How to know in the code behind if the window has been open from another window
superreview granted: [Bug 263844] Javascript window.close() on popup not working when popup is opened in tab : [Attachment 162257] set opener on opened windows diverted into tabs
use VB.NET and C#.NET code in the same C#.NET project
Popup window appears behind opener window in v2.0
Open Popup Window and Close the window that Opened it
How to disable a Parent window when the Child pop-up window opens in
Calling a sever side code behind sub routine from client side java script
Hi is it possible to call a server side sub routine from client side javascript what I what to do is call a form based email routine from the client, I am hoping that by doing it this way I can disable the button used to call the routine imeadiatly so it's only possible to click it 1 time to prevent the same email being send multiple times, and in addtion start a client routine to indicate the email is underway with some graphic of some sort so the use knows that something is happening, all this is because if the attacment is quite large it takes a little while for the procees to...