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

Unable to retrieve parameter value with "+" sign from URL using Request object

126 100+
Hello everyone!

I am a new beginner to ASP.NET, I have created two pages page1.aspx, page2.aspx and I am trying to pass course name value to page2.aspx from page1.aspx using the following URL:

page2.aspx?course=C++

But when I use the request object in page2.aspx in order to retrieve "course" value using the following code, I only receive C instead of C++

CourseLabel.Text = Request["course"].ToString();

Please give me an idea on how to handle this issue.

Thanks in advance.
Oct 14 '08 #1
2 1243
Plater
7,872 Expert 4TB
The "+" character has special meaning in URLs (it means space I beleive)
You will need to encode the + sign into its correct value before sending in the url.
Try using URLEncode/URLDecode to do it.
Oct 14 '08 #2
JFKJr
126 100+
The "+" character has special meaning in URLs (it means space I beleive)
You will need to encode the + sign into its correct value before sending in the url.
Try using URLEncode/URLDecode to do it.
Thanks for your suggestion.

Using "Server.URLEncode" in page1.aspx and "Request.QueryString" in page2.aspx I am able to retrieve the course value with special characters.
Oct 14 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Mudassar | last post by:
i want to get the property value using reflection. Scenerio: i have a status bar on MDI form. it has property named "Panels" and i want to get a specific panel from that panels collection using...
3
by: Leo | last post by:
OK, this is kind of a conceptual question, so bear with me... When does a Value Object or Data Transfer Object become a Business Object, if it even does at all? For instance, in J2EE we often...
2
by: MattBell | last post by:
I have what I'm hoping doesn't turn into a very big problem. We have a set of value objects which all inherit from a base value object which contains functionality common to all of the objects. We...
1
by: Patrick Parent | last post by:
I was looking at this and I was wondering, it the value object only contains property or does it also contains validation ? Also If I have a relation between a Workorder and a Customer, should I...
1
by: sathyan8294 | last post by:
i am using dotnet 2003.i am doing my project in vb.net windows application.i have two form in my project.first form is datagrid .In second form label,textboxes and combobox are avilable to save the...
0
by: MArgente | last post by:
Hello All. I've searched around and couldn't get a definitive answer for my case: I have a form that is sending information to a SQL Server and I am getting the error: Parameter object is...
7
by: messagewalker | last post by:
Hi guys, I wanted to know how to set node value using xpath, for example <root> <name></name> </root> what I want is get the node 'name' and set its value to say 'bob', so it will be like...
2
by: blazzer | last post by:
Hi, I need help. I just wondering whether i can set the double value using random class..i even use if statement to set it..but nothing..i wanna set between 0.5 n 0.7 value.. double planetMass...
2
by: antonmaju | last post by:
HI, I have problem with CR Server XI in my ASP.NET application. I created reports with dynamic cascading parameters. Everything was fine before I uploaded it into BO repository. I logon as...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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?
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
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
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...

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.