473,767 Members | 4,774 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Cannot get right value from nested query string

I would like to query a nested query string

go.aspx?redirec t=to.aspx?par1= value1&par2=val ue2

The problem is that inside go.aspx, Request.QuerySt ring("redirect" ) only
gives me

to.aspx?par1=va lue1

instead of

to.aspx?par1=va lue1&par2=value 2

Is there any other way to write

go.aspx?redirec t=to.aspx?par1= value1&par2=val ue2

to avoid this problem?.

thanks

Leonardo

Nov 21 '05 #1
6 2858
Hi Leonardo,

You need to url encode the redirect parameter value so it looks something
like:
go.aspx?redirec t=to.aspx%3fpar 1%3dvalue1%26pa r2%3dvalue2

You can url encode strings using shared methods in the HttpUtility class.
For example:

Dim urlEncoded =
HttpUtility.Url Encode("to.aspx ?par1=value1&pa r2=value2")

You can decode the url at the other end in a similar way. For example:

Dim urlDecoded = HttpUtility.Url Decode(Request. Params("redirec t"))

Hope this help,

Phil Harvey

--------------------
http://spaces.msn.com/members/dotnetspace
Nov 21 '05 #2
I would do:

go.aspx?redirec t=to.aspx||parm s=par1=value1|p ar2=value2

then when you get the parms value you can replace the || with ? and then the
| with & and you have your redirect string.

Just a thought
Chris
"Leonardo Santos-Macias" <ls*********@ho tmail.com> wrote in message
news:ul******** ******@TK2MSFTN GP11.phx.gbl...
I would like to query a nested query string

go.aspx?redirec t=to.aspx?par1= value1&par2=val ue2

The problem is that inside go.aspx, Request.QuerySt ring("redirect" ) only
gives me

to.aspx?par1=va lue1

instead of

to.aspx?par1=va lue1&par2=value 2

Is there any other way to write

go.aspx?redirec t=to.aspx?par1= value1&par2=val ue2

to avoid this problem?.

thanks

Leonardo

Nov 21 '05 #3
Thanks Phil...

This has sense but I am not writing any server code, I would like to fix it
in the client page (javascript included) since I want to have a "progress"
gid displayed while I do a search

<script language="javas cript">
document.locati on.href="<%=Req uest.QueryStrin g("redirect")%> ";
</script>
"Phil Harvey" <ph***@teamlink .it> wrote in message
news:em******** ******@TK2MSFTN GP12.phx.gbl...
Hi Leonardo,

You need to url encode the redirect parameter value so it looks something
like:
go.aspx?redirec t=to.aspx%3fpar 1%3dvalue1%26pa r2%3dvalue2

You can url encode strings using shared methods in the HttpUtility class.
For example:

Dim urlEncoded =
HttpUtility.Url Encode("to.aspx ?par1=value1&pa r2=value2")

You can decode the url at the other end in a similar way. For example:

Dim urlDecoded = HttpUtility.Url Decode(Request. Params("redirec t"))

Hope this help,

Phil Harvey

--------------------
http://spaces.msn.com/members/dotnetspace

Nov 21 '05 #4
Thanks Chris...

This has sense but I am not writing any server code, I would like to fix it
in the client page (javascript included) since I want to have a "progress"
gid displayed while I do a search

<script language="javas cript">
document.locati on.href="<%=Req uest.QueryStrin g("redirect")%> ";
</script>

"Chris, Master of All Things Insignificant" <chris@No_Spam_ Please.com> wrote
in message news:Ov******** ******@TK2MSFTN GP14.phx.gbl...
I would do:

go.aspx?redirec t=to.aspx||parm s=par1=value1|p ar2=value2

then when you get the parms value you can replace the || with ? and then the | with & and you have your redirect string.

Just a thought
Chris
"Leonardo Santos-Macias" <ls*********@ho tmail.com> wrote in message
news:ul******** ******@TK2MSFTN GP11.phx.gbl...
I would like to query a nested query string

go.aspx?redirec t=to.aspx?par1= value1&par2=val ue2

The problem is that inside go.aspx, Request.QuerySt ring("redirect" ) only
gives me

to.aspx?par1=va lue1

instead of

to.aspx?par1=va lue1&par2=value 2

Is there any other way to write

go.aspx?redirec t=to.aspx?par1= value1&par2=val ue2

to avoid this problem?.

thanks

Leonardo


Nov 21 '05 #5
This website will help you!
http://www.kamath.com/codelibrary/cl006_url.asp

var s = Escape(str);
and
var =s Unescape(str);
perform url encoding/decoding in javascript.

Phil Harvey

--------------------
http://spaces.msn.com/members/dotnetspace
Nov 21 '05 #6
Great, thanks!!

"Phil Harvey" <ph***@teamlink .it> wrote in message
news:#5******** ******@TK2MSFTN GP09.phx.gbl...
This website will help you!
http://www.kamath.com/codelibrary/cl006_url.asp

var s = Escape(str);
and
var =s Unescape(str);
perform url encoding/decoding in javascript.

Phil Harvey

--------------------
http://spaces.msn.com/members/dotnetspace

Nov 21 '05 #7

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

Similar topics

10
1896
by: Jack | last post by:
Hi, I cannot get the date format correctly in dynamic sql statement, after trying various ways of handling it. I need some help with the date format in the following dynamic sql statement. Any help is appreciated in advance. While running the asp page, I still get an error as Error Type: Microsoft VBScript runtime (0x800A000D) Type mismatch: 'Format' DYNAMIC SQL STATEMENT:
8
5479
by: baustin75 | last post by:
Posted: Mon Oct 03, 2005 1:41 pm Post subject: cannot mail() in ie only when debugging in php designer 2005 -------------------------------------------------------------------------------- Hello, I have a very simple problem but cannot seem to figure it out. I have a very simple php script that sends a test email to myself. When I debug it in PHP designer, it works with no problems, I get the test email. If
1
2138
by: Jerry Collings | last post by:
I'm getting improperly nested xml when a column contains null. I modified the first row (customer ALFKI) to have a NULL Address column. I'm using the following XSD Annotated Schema against the NorthWind database: <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:sql="urn:schemas-microsoft-com:mapping-schema"> <xs:element name="customer" sql:relation="Customers"
4
5756
by: Alfetta159 | last post by:
I've been setting up a schema with the XML Designer in VS .NET 2003. The designer lets me set up a lot of things including a complex type that contains an unnamed complex type called modified. When I try to preview the dataset, I get an error described as "The same table (modified) cannot be the child table in two nested relations. I've run into this before with a different complex type, and I've changed the name of the instance of...
4
3292
by: Koen | last post by:
Hi all, At work I created a database which is really helpful. The database is used by approx 15 users. Everything worked great, until I added some 'scoreboard' forms and reports. I get the "Cannot open any more databases" error. The 'scoreboard' form show a matrix of 6 columns, 7 rows. Each cell is calculated separate by (what I call complex) queries.
2
4675
by: dskillingstad | last post by:
I would really appreciate someone's help on this, or at least point me in the right direction.... I'm working on a permit database that contains 12 tables, and rather than list all of the tables, I'll just list a few, as the links are the same for all tables. These tables are: tblPermitMain tblApplicant tblContractor tblEngineer
14
1714
by: c676228 | last post by:
Hi everyone, Our site is down, because of our hosting company applied sql server 2000 sp4 on windows 2000 server. right after it applied the service pack, our sql server database is down and no conn etc. When one technical support restart the server, the obejcts like tables in database cannot be recognized from our asp pages anymore, data cannot be inserted into any database table and data cannot be
1
5090
by: Vishakh | last post by:
Hello, I am trying to create pivot tables using data from CSV files. Here is an example: String conStr = "Driver={Microsoft Text Driver (*.txt; *.csv)};DBQ=C:\\"; String query = "SELECT * FROM content0.csv"; Recordset content = new Recordset(); Connection cn = new Connection(); cn.Open(conStr, "", "", 0); content.Open(query, cn, CursorTypeEnum.adOpenStatic, LockTypeEnum.adLockOptimistic , 0);
0
1185
petepell
by: petepell | last post by:
Hello all, I am developing an application in VB 2008 that works with a SQL2005 DB to store and manipulate employee data. In one section of the app I want to be able to show a treeview of the hierarchy as a whole showing a nested hierarchy of who reports to who such that when it is first loaded, all you will see is the top guy in the company with a plus next to his name. Opening that will reveal his first level reports and opening those will...
0
9407
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10170
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10014
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9960
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9841
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6656
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
3931
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3534
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2808
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.