473,378 Members | 1,426 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,378 software developers and data experts.

# in query string......

strMyMsg = Request.QueryString("MyString")

In the above query MyString is suppose to have "Test Data # 123"

It appears that the "#" sign and the data after that is not getting
populated in strMyMsg.

Is it not possible to pass "#" as query string data?

I am using .Net Frame work 1.1.

Thanks,

Will


Nov 18 '05 #1
5 1254
You need to Server.UrlEncode the value, it'll give you %23

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/
"Wilson Smith" <WW*******@hotmail.com> wrote in message
news:uD**************@TK2MSFTNGP11.phx.gbl...
strMyMsg = Request.QueryString("MyString")

In the above query MyString is suppose to have "Test Data # 123"

It appears that the "#" sign and the data after that is not getting
populated in strMyMsg.

Is it not possible to pass "#" as query string data?

I am using .Net Frame work 1.1.

Thanks,

Will

Nov 18 '05 #2
The # will be "eaten" by the browser which assumes it is a reference to a
bookmark.

"Wilson Smith" <WW*******@hotmail.com> wrote in message
news:uD**************@TK2MSFTNGP11.phx.gbl...
strMyMsg = Request.QueryString("MyString")

In the above query MyString is suppose to have "Test Data # 123"

It appears that the "#" sign and the data after that is not getting
populated in strMyMsg.

Is it not possible to pass "#" as query string data?

I am using .Net Frame work 1.1.

Thanks,

Will


Nov 18 '05 #3
I have code like this.

strURL="frmMyPage.aspx?CUST_ID=PIN#456"

Reponse.Redirect(strURL)

In the frmMyPage.aspx page I am using

strCustNo = Request.QueryString("CUST_ID")

How to use the below code in the above case?

Thank you very much for the reply.

Will


"Karl Seguin" <karl REMOVE @ REMOVE openmymind REMOVEMETOO . ANDME net>
wrote in message news:ul*************@tk2msftngp13.phx.gbl...
You need to Server.UrlEncode the value, it'll give you %23

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/
"Wilson Smith" <WW*******@hotmail.com> wrote in message
news:uD**************@TK2MSFTNGP11.phx.gbl...
strMyMsg = Request.QueryString("MyString")

In the above query MyString is suppose to have "Test Data # 123"

It appears that the "#" sign and the data after that is not getting
populated in strMyMsg.

Is it not possible to pass "#" as query string data?

I am using .Net Frame work 1.1.

Thanks,

Will


Nov 18 '05 #4
> The # will be "eaten" by the browser which assumes it is a reference to a
bookmark.


Or, more specifically, the name and/or ID of an anchor tag.

-Darrel
Nov 18 '05 #5
the below link has a nice article about it
http://www.4guysfromrolla.com/webtech/042601-1.shtml
Thanks,
Will
"Wilson Smith" <WW*******@hotmail.com> wrote in message
news:#w**************@TK2MSFTNGP10.phx.gbl...
I have code like this.

strURL="frmMyPage.aspx?CUST_ID=PIN#456"

Reponse.Redirect(strURL)

In the frmMyPage.aspx page I am using

strCustNo = Request.QueryString("CUST_ID")

How to use the below code in the above case?

Thank you very much for the reply.

Will


"Karl Seguin" <karl REMOVE @ REMOVE openmymind REMOVEMETOO . ANDME net>
wrote in message news:ul*************@tk2msftngp13.phx.gbl...
You need to Server.UrlEncode the value, it'll give you %23

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/
"Wilson Smith" <WW*******@hotmail.com> wrote in message
news:uD**************@TK2MSFTNGP11.phx.gbl...
strMyMsg = Request.QueryString("MyString")

In the above query MyString is suppose to have "Test Data # 123"

It appears that the "#" sign and the data after that is not getting
populated in strMyMsg.

Is it not possible to pass "#" as query string data?

I am using .Net Frame work 1.1.

Thanks,

Will



Nov 18 '05 #6

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

Similar topics

8
by: Phil Powell | last post by:
if (document.location.href.indexOf('?') >= 0) document.location.href = document.location.href.substring(0, document.location.href.indexOf('?')); if (document.location.href.indexOf('#') >= 0) {...
3
by: Dr. Oz | last post by:
Hi, I am trying to read in a query string from one page and build a link to another page based on the query string. Here's the code I am using to read in the query string: <script...
4
by: Alan Lane | last post by:
Hello world: I'm including both code and examples of query output. I appologize if that makes this message longer than it should be. Anyway, I need to change the query below into a pivot table...
0
by: starace | last post by:
I have designed a form that has 5 different list boxes where the selections within each are used as criteria in building a dynamic query. Some boxes are set for multiple selections but these list...
3
by: MLH | last post by:
Am repeating question with different subject heading, perhaps stating more clearly my problem... I have an A97 query (qryVehiclesNowners2) that has a table field in it named . Depending on the...
4
by: deko | last post by:
When using OutputTo with a query, the 'File name' window in the 'Output To' dialog gets populated with the name of the query by default. This makes the exported file self-describing if the query...
1
by: Oliver Bleckmann | last post by:
Damn, what's wrong here? CGI cgi; map<string,stringcgiParam = cgi.analyseCgiParam(); cout << cgiParam << endl; cout << cgiParam << endl; /////////////////////// #include <iostream>
2
by: =?Utf-8?B?Q2hyaXM=?= | last post by:
How can I run this query against a table in my Access database? I don't know hwo to use it in C#. In VB I would use .Recordset = "some sql statement". How do I do this in C#? //I get a vlaue...
1
by: TF | last post by:
This group came through for me last time so here we go again. My page shows paint colors, brand name, product code, etc in a gridview with the background matching the paint color. Several links on...
3
by: pbd22 | last post by:
Hi. I need some help with structuring my query strings. I have a form with a search bar and some links. Each link is a search type (such as "community"). The HREF for the link's anchor looks...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.