Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: ASP.NET
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 30-Jan-13 23:20pm
Comments
AshishChaudha at 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/ at 3-Feb-13 6:22am
   
an upvote, if the answer helped would have been nice. :)
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Hmmm... try to put this sign "@" in front of quotation.
  Permalink  
Comments
aassaahh at 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(" ", "");
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

& 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.
  Permalink  
Comments
Ankur\m/ at 31-Jan-13 5:34am
   
I was struggling to write & quot ; without spaces. They encode it here as well.
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 3

use
Replace("quot","'");
  Permalink  

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

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 746
1 OriginalGriff 345
2 Magic Wonder 131
3 Kishore Pogaru 130
4 Fredrik Bornander 130
0 OriginalGriff 5,705
1 Sergey Alexandrovich Kryukov 4,763
2 CPallini 4,570
3 George Jonsson 3,142
4 Gihan Liyanage 2,450


Advertise | Privacy | Mobile
Web03 | 2.8.140916.1 | Last Updated 31 Jan 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100