3
Contributors
3
Replies
6
Views
4 Years
Discussion Span
Last Post by stbuchok
1

Did you try this...

string strText = "'basic@yahoo.com'";
Response.Write(strText.Replace("'", ""));

0

yes, but it completely ommits the quotes ,
i want to keep " " .
like "basic@yahoo.com"

1

HunainHafeez, what JorgeM is showing you is correct. It is replacing any single quote with an empty string. Another way to write this is:

string strText = "'basic@yahoo.com'";
Response.Write(strText.Replace("'", String.Empty));

If your string already contains double quotes, they will remain.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.