Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: ASP.NET
hello i have a chatting.cs file in which i want to bold the user name..i'm using below code but its not workin....
 
string myuser="" + User + ": ";
 
can you help me to correct the code so that i can bold the user name
Posted 5-Jan-13 3:35am

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

It depends how you display the username exactly. In general, this should work:
string myuser="<b>" + User + "</b>: ";
 
But, if the string is sent to the buffer html encoded, than it won't work. For further help, you should post the code portion or the detailed logic of how exactly you output this.
  Permalink  
Comments
Cto Manav Parasrampuria at 5-Jan-13 9:45am
   
but i need to allow the text through buffer html...so can you help me in soloving this problem with using html buffer....i can bold the text
Cto Manav Parasrampuria at 5-Jan-13 9:52am
   
nd i have not use htmlencoded....but it show the code..so how can i use
Cto Manav Parasrampuria at 5-Jan-13 9:55am
   
actually output display as:
d says: gg
Zoltán Zörgő at 5-Jan-13 11:34am
   
What are you using to output?
Cto Manav Parasrampuria at 5-Jan-13 12:52pm
   
"user" ie user with b tag shwon..
 
but user must be bold....that is not true..

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

  Print Answers RSS
0 Nirav Prabtani 318
1 OriginalGriff 227
2 Sergey Alexandrovich Kryukov 216
3 Mika Wendelius 185
4 CPallini 170
0 Nirav Prabtani 284
1 OriginalGriff 217
2 Sergey Alexandrovich Kryukov 196
3 Mika Wendelius 185
4 CPallini 170


Advertise | Privacy | Mobile
Web04 | 2.8.140721.1 | Last Updated 5 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