?
Solved

passing backslash as part of querystring

Posted on 2006-11-30
2
Medium Priority
?
819 Views
Last Modified: 2006-11-30
I have a hyperlink as follows
                        <a href="javascript:var w=window.open('Reports.aspx?Path=<%# Eval("rptPath") %>','','width=950,height=400,resizable=yes');" />
                        Show Details...></a>
all it does is opens a pop up page called Reports.aspx while passing a QueryString called Path

where Path holds a physical path of a report example: D:\Reports\xyz.rpt

However.. when i try passsing it as a Query string .. it ignores the blackslash '\' and passes D:Reportsxyz.rpt instead..

Why does this happen.. how can i preserve the blackslash '\' ..

The reason i cannot hardcode it is because the values of Query string named Path is passed dynamically from the database..

Thanks in Advance

0
Comment
Question by:Collindsouza
[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
  • 2
2 Comments
 
LVL 17

Accepted Solution

by:
gops1 earned 2000 total points
ID: 18044495
"\" is considered to be an escape character. Why dont you add one more along with that so that they dont get escaped.

Either store in your database or use regular expression.

D:\\Reports\\xyz.rpt
0
 
LVL 17

Expert Comment

by:gops1
ID: 18044501
you can use the other slash too:

 D:/Reports/xyz.rpt
0

Featured Post

[Webinar] How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them.

Question has a verified solution.

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

This article shows how to create and access 2-dimensional arrays in JavaScript.  It includes a tutorial in case you are just trying to "get your head wrapped around" the concept and we'll also look at some useful tips for more advanced programmers. …
This article discusses how to implement server side field validation and display customized error messages to the client.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses

762 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