Control Panel
Forum
Hosting Help
ASP.NET 3.5 & SQL 2008 Web Hosting
Resources
Login
Members
Shared Hosting
|
New Features
|
Advertise
|
Tutorials
|
Silverlight Tutorials
|
Product Reviews in India
|
Free aptitude test questions
|
TATA Nano Car reviews
Total
members
:
133426
Average new registrations per day (in last 7 days):
122
New Registration:
Open
Register Now
Want to become a DBA ?
SQL Server 2008 training courses
- by AspSpider team
Home
»
Questions & Answers
»
code to open new window in C#?
code to open new window in C#?
1/24/2008
Author:
Ramakrishnan
hi,
can anyone help me to open new window using C# in code behind..with out using javascript?
Answers .............
Author:
pham van duy
Posted Date: 1/24/2008
Respone.Write("javascript here");
Author:
Ramakrishnan
Posted Date: 1/24/2008
i need code without using javascript...i want to use the page name only...in javascript we have to use full path
Author:
Clive
Posted Date: 1/24/2008
<a href="BigImage.aspx" target="_blank">new Window</a>
this open a new window
Author:
mahdieh mehrabai
alzahra
Posted Date: 1/24/2008
you also can use hyperlink control and change the target property to _blank to open the target in new window
Author:
Paulo Ricca
Posted Date: 1/27/2008
you can't tell the client to open a new window, from the server! that'd be a huge security issue, don't you think?
Author:
Anupam Mittal
Freelancer
Posted Date: 1/28/2008
Yep - opening a new window is a feature available only to the client - that is your browser. The only thing that the server can do is to generate html/javascript code that would instruct the client to perform opening of a new window.
Regarding your concern of full path, please note that javascript supports relative paths.
Author:
Nigel Collier
Posted Date: 1/29/2008
http://aspspider.ws/ASPandUShallRx
ASPAndUShallRx
Have a look at the Response.Redirect option
There's an article called "Performing Page Navigation (Scenario 2)" here:-
"
http://samples.gotdotnet.com/quickstart/aspplus/doc/webserverctrls.aspx"
>
Author:
Nigel Collier
Posted Date: 1/29/2008
http://aspspider.ws/ASPandUShallRx
ASPAndUShallRx
Please ignore this entry
Author:
Harvey Dobson
Interwave
Posted Date: 1/29/2008
yeah i think it is Respone.Write("javascript here"); as pham van duy said :)
Author:
Paulo Ricca
Posted Date: 1/29/2008
lol.. i think Response.Write("javascript here"); doesn't really fit the "with out using javascript" requirement :P
Author:
MD. MOSHIUR RAHMAN
Posted Date: 1/30/2008
Java script code like window.open()
Author:
Eduardo Pinto
Posted Date: 2/1/2008
if you don't want javascript, use hyperlink control with target property _blank like has been said above
Author:
Rubin Chacko
Posted Date: 2/1/2008
use the system.windows namespace in asp.net to open a message box
Author:
Luis Fernando Moreno Cano
ITESI
Posted Date: 2/5/2008
Response.Redirect("url or page name");
Author:
Alvimar Aramuni e Silva
Posted Date: 2/7/2008
Use a control that possibility to set the target property to _blank
Author:
Andre Pinto
Posted Date: 2/12/2008
I would suggest you to use a div window or a panel to simulate a new window.
Author:
gallant
palvest Co.
Posted Date: 2/13/2008
as they told yo dude
Respone.Write("javascript here");
Author:
A A
Posted Date: 2/23/2008
Use target = "_blank"
Author:
Chan Ho Ngai
Posted Date: 2/23/2008
Try to search the help for window.opener and you will know how
Author:
kevinchen
scu
Posted Date: 2/25/2008
It may be impossible ,the server can't send a new window to your computer.If it could,our browser will be out of contol
Author:
Elijah Manor
Posted Date: 2/28/2008
I don't like to use Response.Write unless I am trying to write out a file (pdf, excel, or something).
You may need something like the following.
ScriptManager.RegisterStartupScript(this, typeof(string), "OPEN_WINDOW", "window.open( '
http://www.google.com
', null, 'height=200,width=400,status=yes,toolbar=no,menubar=no,location=no' );", true);
Author:
Brian Linsner
Posted Date: 8/19/2008
That worked for me, Thanks for posting. I am going to a local page with the following syntax:
ScriptManager.RegisterStartupScript(this, typeof(string), "OPEN_WINDOW", "window.open( 'PackingSlipPrint.aspx', null, 'height=400,width=800,status=yes,toolbar=no,menubar=no,location=no' );", true);
had to allow popups on the client.
Author:
jojimark
Home
Posted Date: 10/1/2009
hai...everybody................
Hyperlink properties.... chang target as _blank....
For more details..... mail me: jojimark@rediffmail.com
You must
login
to post answer for this question.
Advertise
Privacy Policy
Terms of use
Contact Us
SpiderWorks Technologies Pvt Ltd.
All Rights Reserved.