Click here to Skip to main content
15,904,348 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I'm working on a project in which I have to use special characters.
After adding some rows in tables, I fill a GridView with a stored procedure from three tables. Also, I can select a row and fill the textboxes and dropdown lists with that row.
The problem exists by the textboxes where the column of a row has an character and is not showing it properly for example:
C#
without spaces between symbols
 Ë = & # 203;
 ë = & # 235;
Ç = & # 199;
ç = & # 231;


My question is how to fix this when selecting a specific row to show in textboxes those kind of characters.
Thank you in advance for your reply.
Cheers.
Posted
Updated 20-Oct-15 12:27pm
v3
Comments
Sergey Alexandrovich Kryukov 20-Oct-15 20:19pm    
Do you think there are some characters which are "special"? I never knew any...
—SA
ZurdoDev 20-Oct-15 20:44pm    
I don't follow exactly where your problem is; however, you may benefit from using Server.HtmlEncode() to encode the data and Server.HtmlDecode() to decode.
dr_iton 21-Oct-15 2:45am    
When I select a row in Grid View, a column of it has an word with a character I wrote above, for example Ç, and when I populate textboxes with those columns, these characters are not shown WYSIWYG in textbox, the special character Ç is converted in ("without spaces "& # 199).
dr_iton 21-Oct-15 4:28am    
I fixed the problem using HttpUtility.HtmlDecode();
The problem now stands by the textbox where I put the password.
How to show the text from Grid View in a textbox with TextMode="Password"
Thank you again.
Sreekanth Mothukuru 21-Oct-15 6:54am    
I think there is no way we could assign text like *** to a textbox of type password. By the way add your answer in the section below to mark it as "Answered".

1 solution

As mentioned in the comments, you can use the HtmlEncode and/or HtmlDecode() functions to handle special characters.

If textmode = password then you won't see the text. If you want to show the text, don't make textmode = password.
 
Share this answer
 

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