Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Encoding URL

Posted on 2013-05-20
7
Medium Priority
?
479 Views
Last Modified: 2013-05-21
If I want to pass a SQL WHERE clause as a URL parm, I need to encode all the parms, correct?  So, I'm using Server.UrlEncode(parms) prior to doing the Response.Redirect.  Now, on the other end when I want to extract the parms, I guess I need to decode first?  I can Server.UrlDecode.   But if I'm using HttpContext.Current.Request.QueryString to get the parm, how do I use both HttpContext.Current.Request.QueryString and Server.UrlDecode in combination?
0
Comment
Question by:HLRosenberger
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 2
7 Comments
 
LVL 29

Accepted Solution

by:
QPR earned 1500 total points
ID: 39182743
Server.UrlEncode(HttpContext.Current.Request.QueryString(parms).ToString())
0
 
LVL 1

Author Comment

by:HLRosenberger
ID: 39185478
do you mean:

Server.UrlDecode(HttpContext.Current.Request.QueryString(parms).ToString())
0
 
LVL 29

Expert Comment

by:QPR
ID: 39185489
Oops yes
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 1

Author Comment

by:HLRosenberger
ID: 39185535
I tried that.  it does not work.  I have this:

report_id = Server.UrlDecode(HttpContext.Current.Request.QueryString("report_id").ToString())

This part is nothing:

HttpContext.Current.Request.QueryString("report_id")

because it does not find the "report_id" because everything after the ? in the URL is encoded.  So, How do I extract parms from an encoded URL?  If not encoded, this works fine:

HttpContext.Current.Request.QueryString("report_id")
0
 
LVL 1

Author Comment

by:HLRosenberger
ID: 39185551
I got it working.  Only the data is supposed to be encoded.  I was encoding everything after the ?.  

Thanks!
0
 
LVL 1

Author Comment

by:HLRosenberger
ID: 39185553
I've requested that this question be closed as follows:

Accepted answer: 0 points for HLRosenberger's comment #a39185478

for the following reason:

thanks
0
 
LVL 1

Author Closing Comment

by:HLRosenberger
ID: 39185554
Thanks
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Today is the age of broadband.  More and more people are going this route determined to experience the web and it’s multitude of services as quickly and painlessly as possible. Coupled with the move to broadband, people are experiencing the web via …
A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses

650 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question