简体   繁体   中英

how to ignore character “\” if this is in a dropdownlist c#

I am building an application on c# visual studio for a web page. I have in a dropdownlist in C# a item "soporte\\andres" but when i take that value i have "soporte\\andres"

This is the image about what i have in a dropdownlist:
在此处输入图片说明

but doing a debug i have this value in a variable:
在此处输入图片说明

What can I do to get the exact value I need ("soporte\\andres") ?
I tried to use @dropwdownlist.value but this doesn´t work. Visual Studio continues changing "\\" for "\\\\" .

我看不到您的代码,但总的来说,您会执行以下操作:

string a = @"soporte\andres";

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM