Click here to Skip to main content
12,248,978 members (37,381 online)
Rate this:
 
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 31-Jan-13 0:20am
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. :)
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 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/ 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
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web02 | 2.8.160426.1 | Last Updated 31 Jan 2013
Copyright © CodeProject, 1999-2016
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