473,394 Members | 1,879 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Response.Write with QueryString and Target

Hello,

I am trying to redirect to a new URL using a query string and target. I can
not figure out how the syntax should be for setting the target. Any help
with this would be appreciated.
--
Thanks in advance,

sck10
Public strQuote As String = """"
Dim strTarget As String = "target=" & strQuote & "_blank" & strQuote
Response.Redirect("srcfinance.aspx?qv01=14&print=p rintme" & strTarget)
Jun 1 '06 #1
2 2418
You can't use a target with Response.Redirect. When the page is executed
on the server, it's already decided where the resulting page will be loaded.

Either you have to use the target when the request is made, or you have
to output a page that contains Javascript that will set the location of
the window or frame where you want to load the page.

sck10 wrote:
Hello,

I am trying to redirect to a new URL using a query string and target. I can
not figure out how the syntax should be for setting the target. Any help
with this would be appreciated.

Jun 1 '06 #2
Hi,

Thank you for your post!

Based on my understanding, you are trying to redirect to a page and want it
open in a new window.

It's not possible to do this in Response.Redirect, because frames and
windows are client-side concepts. The only possible workaround is the usage
of JavaScript. You can do a simple Response.Write inline with a JavaScript
call to window.open for the specified url. For example:

Response.Write("<script language=javascript>window.open('WebForm2.aspx',
'_blank');

Hope this helps. If anything is unclear, please feel free to post here.
Regards,
Walter Wang
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.

Jun 5 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Rob McLennan - ZETLAND | last post by:
Hi, I'm relatively clueless when it comes to correct ASP syntax. I'm testing out a search form for my company's website which is done in ASP. The results are displayed as per the code shown at the...
6
by: Mark | last post by:
Hi... I've come across some weird bug with Response.Cookies. Or maybe it will be called "by design" but for the life of me I can't figure out what purpose it would serve. If you're setting a...
4
by: Max Dupenois | last post by:
I've seen numerous articles with similair (similar sp?) titles to this in my search.. unfortunately none of them seem to contain what i want, (or if they do i need someone to point out my stupidity...
7
by: Anne | last post by:
hie there, i want to be able to pass multiple parameters to another page. currently, i am able to do so, but somehow i feel it is not the correct way to do it. below is part of what i have so far....
2
by: Stephan Bour | last post by:
I have a vexing problem I hope someone can help me with: I have an ASP.Net site that allows users to place orders for biological materials. Once the order is done though, I would like to have two...
10
by: isaac2004 | last post by:
hello i am trying to use a response redirect statment to show a message upon deletion of a record from a database. my database is ran though a page with a table with a delete option on the side....
2
by: Michael D. Ober | last post by:
When I single step through the code below, it sends back the PDF file that is retrieved in the line fm.GetAccountPDF(...). When I run without single stepping, I get the master page for this page. ...
0
by: bmeahan | last post by:
I have a c# web app on .net 1.1 framework. Currently I have a process where I can upload files (.doc, .xls, etc) to a my sql database. When trying to open the files however I'm running into an...
4
by: AAaron123 | last post by:
trying to understand the below shown code. After this is run the browser opens a file-save dialog box for saving the file. I wonder how it knows I want the file saved? But more important, the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.