Solved

passing backslash as part of querystring

Posted on 2006-11-30
2
801 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
  • 2
2 Comments
 
LVL 17

Accepted Solution

by:
gops1 earned 500 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Introduction HTML checkboxes provide the perfect way for a web developer to receive client input when the client's options might be none, one or many.  But the PHP code for processing the checkboxes can be confusing at first.  What if a checkbox is…
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
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…

828 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