Replacing "\\" with "\"

Hi all

I'm getting this value from a CheckBoxList control - a location of file, i have to remove "\\" and replace it with "\" and pass it to Query, how to do it, i tried with Replace, but coud'nt suceed.

"\\\\Blaze10xp\\BLZ_SFS_07\\Sample Excel Files\\Excel Files\\report2.xls"

thank's in advance

- Prakash.C

0
prakashdotc
9/27/2007 9:04:09 AM
📁 asp.net.web-forms
📃 93655 articles.
⭐ 6 followers.

💬 2 Replies
👁️‍🗨️ 4087 Views

you tried Replace like this?

string newstring = oldstring.Replace(@"\\",@"\");


Plese, do not forget to click "Mark as Answer" on the post that helped you. Thanx!

My blog: Scenes From A Developer Memory
0
dt008
9/27/2007 12:02:11 PM

yes i tried like that then also it shows that "invalid escape seqeance..."

no-one haven't came across this problem yet....?

please any solution  

Prakash.C

0
prakashdotc
10/3/2007 12:34:33 PM
Reply: