How can I display selected part of an asp.net string with HTML Formatting.
Eg:
String str= "Yerevan Airport(<B>UB21</B>,AM-ER,Yerevan,)";
I need to display the text enclosed in <B>
and </B>
in bold and display it as text in RADComboBox
.
I have tried it with using StringBuilder , HttpUtility.Htmlencode, String.Format but couldn't find any proper solution.
What you are trying to achieve is not possible.
The DropDownList
control of ASP.Net renders to a html <select>
control which doesn't allow markup inside it's <option>
elements.
Try this:
String str = "Yerevan Airport <BR /> UB21 <BR />";
String strHtml = Server.HtmlDecode(str);
For using RadComboBox , follow this url
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.