Solved

passing backslash as part of querystring

Posted on 2006-11-30
2
787 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
Comment Utility
"\" 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
Comment Utility
you can use the other slash too:

 D:/Reports/xyz.rpt
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

When you need to keep track of a simple list of numbers or strings, the Array object is your most direct tool.  As we saw in my earlier EE Article (http://www.experts-exchange.com/A_3488.html), typical array handling might look like this: (CODE) B…
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…
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…

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

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now