Click here to Skip to main content
15,891,757 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
I want to assign quotation mark(') in the textbox
for ex

i have stored let say microsoft'''''''s in the database
i want to retrive this value from the database and assign this to the textbox ,
But the problem is the quotation(') is dispaly as
microsoftquotquotquotquotquotquotquotquotquotquotquotquotquots ,i want it as
i have stored it in the database ie microsoft'''''''s
Posted
Comments
AshishChaudha 31-Jan-13 5:31am    
how you are saving your data?? using stored procedure or parameterized query of inline query..please elaborate your question by using Improve question.
Ankur\m/ 3-Feb-13 6:22am    
an upvote, if the answer helped would have been nice. :)

use
C#
Replace("quot","'");
 
Share this answer
 
& quot ; [without any spaces]
is encoded html for double quotes ("). There is something wrong with how you are storing it. It must have an ampersand prefix and semicolon suffix.

You can use HttpServerUtility.HtmlDecode Method (String)[^] to decode the string to normal text.
 
Share this answer
 
Comments
Ankur\m/ 31-Jan-13 5:34am    
I was struggling to write & quot ; without spaces. They encode it here as well.
Hmmm... try to put this sign "@" in front of quotation.
 
Share this answer
 
Comments
aassaahh 31-Jan-13 5:36am    
but how ??? user is going to enter anything in the textbox .I am assign it to the textbox as
txtCompany.Text = row.Cells[3].Text.Replace(" ", "");

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900