What is your purpose of opening a new window in the server? If you open a new window in the server it will not be available in the client. If you want to open a new window insted of redirecting your client upon request of a particular page try adding a client
script(JS or VB) to open a new window onreadystatechange of the document or
onload of your page. Regards.
The most wasted day is that in which we have not laughed.
Hi , I also have similar requirment. I want to pop up a window at client side thr server side Code. Here is what i want to acheive. 1.) On Save Click I want to check whether duplicate records exists or not ? 2.) If duplicates exist i want to pop up a message
box saying duplicates are exist for this you want to save a new record or cancel. Can some body please tell me how i can open a pop up window thr server side code. Thanks Mandar
---------------------------------- Edit: Bit fixed the link.. ---------------------------------- Did you read the above answer? To be blunt, opening a new window on the server is not going to help your user on the client. See this post: 295136
-pjm
I never gave a damn about the meterman until I was the man who had to read the meter.
I've got a page called"index.aspx" in which there an hyperlink pointing into a popup that serves for logging. When the user submit his logging informations, I want : - first, the popup to sut down first , - then file his personal informations into index.Aspx
Thanks for your help Regards,
1) on your popup code behind page, add this to your submit button:
//c# example:
//UserID and Pwd should be the value you collected in the popup page
//that you want to pass to your first page (index.aspx)
btnSubmit.Attributes.Add( "onClick", "PassInfo( UserID, Pwd )" );
2) on your popup aspx page, write a javascript:
<script LANGUAGE="javascript">
function PassInfo( UserID, Pwd )
{
//close myself (popup page)
window.close();
//populate the data from pop up page to your first page
//index below is the name of the form on your first page (index.aspx)
//please remember javascript and c# are case sensitive.
window.opener.document.index.txtUserID.text = UserID;
window.opener.document.index.txtPwd.text = Pwd;
}
</script>
You didnt get what i am trying to say. I Do not want to Open a window on server. But need to open a Window on Client Side through server side code. And Not though any event.
Open a Window on Client Side through server side code. I dont think so. Server side code executes in the server so what you want is imposible. Server side code that generate client side script will work, But you can only trigger such script through an
event in the client. Hope this makes sense.
The most wasted day is that in which we have not laughed.
Put a target attribute in form tag. <form runat=server target=_blank> As is (over)stated above, you need to do this client side. But this will have the effect you are looking for.
Oh you need to wait at your server until a client call and open a new window for him/her then. LOL. The problem most of us have is to make a simple problem complicated. Think simple and you will be surprise.
keboqi
Member
25 Points
5 Posts
can I open a new window in the server side
Aug 01, 2003 05:53 AM|LINK
new2ASPnet
Member
700 Points
140 Posts
Re: can I open a new window in the server side
Aug 01, 2003 07:12 AM|LINK
V i r g i l R e b o t o n
mandarmd
Member
40 Points
8 Posts
Re: can I open a new window though server side code.
Aug 01, 2003 11:48 AM|LINK
pjmcb
Contributor
2234 Points
459 Posts
Re: can I open a new window though server side code.
Aug 01, 2003 12:41 PM|LINK
I never gave a damn about the meterman until I was the man who had to read the meter.
scottie_peep...
Member
25 Points
5 Posts
Re: can I open a new window in the server side
Aug 01, 2003 03:25 PM|LINK
daibatron
Participant
1090 Points
218 Posts
Re: can I open a new window in the server side
Aug 01, 2003 08:08 PM|LINK
<script LANGUAGE="javascript"> function PassInfo( UserID, Pwd ) { //close myself (popup page) window.close(); //populate the data from pop up page to your first page //index below is the name of the form on your first page (index.aspx) //please remember javascript and c# are case sensitive. window.opener.document.index.txtUserID.text = UserID; window.opener.document.index.txtPwd.text = Pwd; } </script>I hope you get some idea how this work.mandarmd
Member
40 Points
8 Posts
Re: can I open a new window though server side code.
Aug 04, 2003 07:37 AM|LINK
new2ASPnet
Member
700 Points
140 Posts
Re: can I open a new window though server side code.
Aug 04, 2003 09:33 AM|LINK
V i r g i l R e b o t o n
rl711
Participant
825 Points
165 Posts
Re: can I open a new window in the server side
Aug 04, 2003 03:35 PM|LINK
daibatron
Participant
1090 Points
218 Posts
Re: can I open a new window though server side code.
Aug 04, 2003 03:56 PM|LINK