Click here to Skip to main content
12,077,911 members (50,098 online)
Rate this:
 
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 4: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 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 5-Jan-13 9:52am
   
nd i have not use htmlencoded....but it show the code..so how can i use
Cto Manav Parasrampuria 5-Jan-13 9:55am
   
actually output display as:
d says: gg
Zoltán Zörgő 5-Jan-13 11:34am
   
What are you using to output?
Cto Manav Parasrampuria 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
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web03 | 2.8.160212.1 | Last Updated 5 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