Solved

passing backslash as part of querystring

Posted on 2006-11-30
2
811 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 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

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

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

In this article, we'll look how to sort an Array in JavaScript, including the more advanced techniques of sorting a collection of records either ascending or descending on two or more fields. Basic Sorting of Arrays First, let's look at the …
I've been trying to accomplish this for a while and it just struck me yesterday how to accomplish this task. I have done searches all over the internet looking for ways to email pages from my applications and finally I have done it!!! Every single s…
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…

705 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