473,405 Members | 2,310 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,405 software developers and data experts.

asp redirect querystring issue

Hello, I have a variable set up with my query strings for easy use in linking to pages. e.g:

dim QS
QS = "?blah=blah&blah2=blah2"

html code:
<a href="somepage.asp<%=(QS)%>"

asp redirect:
strRedirect = "somepage.asp" & QS
responce.redirect(strRedirect)

Using this method makes the code cleaner and its easier to manage the query strings. However, with redirect commands, &amp; fuddles the encoding. I've also tried %26 as well and that does not work. Is there a way to use standardized code and have it work both ways. i.e. I want my a href links to be compliant and my asp redirects to work :(
Jul 7 '06 #1
1 1914
nvm. i just added a line of code before each redirect to alter the string so it doesnt give problems:

asp redirect:
strRedirect = "somepage.asp" & QS
strRedirect = Replace(strRedirect, &amp; chr(3))
responce.redirect(strRedirect)
Jul 7 '06 #2

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

Similar topics

6
by: Peter Row | last post by:
Hi, I am writing a DLL in VB.NET that implements IHttpHandler.ProcessRequest. This code calls a sub and I need to know if that sub did a response redirect or not. Specifically I need to know...
10
by: Anthony Williams | last post by:
Hi gang, This one looks like a bug :o( As you may or may not know, setting session management in web.config to use cookieless sessions causes the ASP.NET runtime to munge a session ID into...
4
by: Martin | last post by:
I know this might seem like an odd question. I've got a page that has a few url parameters. There's a couple of modes the page can be entered in, with correspondingly different urls params. ...
0
by: Laura K | last post by:
I know this is basic but I just can not get my head around it. I would like to take a querystring and from that querystring redirect the user to a specific page. I set up a simple test and I am...
5
by: MN | last post by:
Hello all - I'm hoping someone will be able to share their knowledge with me about this issue I'm having because I have run out of answers. Here's the scenario.... I have a .aspx page that...
10
by: Johnny Fugazzi | last post by:
I have a couple of pages that have started showing an odd problem. When the code calls Response.Redirect("file.aspx"), nothing happens. The page goes white, and the old URL and querystring are...
5
by: Nirmal Singh | last post by:
I am a newbie trying to learn ASP.net 2.0. I want to retrieve the QueryString and process it to produce some parameters. I then want to redirect the user to another page, passing these...
12
by: gigi | last post by:
How to send more than one value using response redirect? For example i can send one like this response.Redirect "pregled.asp?ime=" & strUserName but how to send two or more values? I tried...
5
by: mister-Ed | last post by:
I need to look into a database table (cats) to see if a certain category and its resulting resultset should be shown to users if it is deemed "universal" , or the column 'ur' is tagged with the...
2
by: karenkksh | last post by:
Hi, public partial class Staff_LeaveNew : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { } protected void...
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?
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.