Reputation: 4892
<%#:string.Format("Home Phone: {0}",Item.Person.HomePhone)%>
In the previous binding definition for ASP.NET Webform DataBoundControl controls type, how can i render the phone number with formated font? For example bold:
Home Phone: 123456
An important detail es that "Home Phone:" is not formatted.
Upvotes: 0
Views: 44
Reputation: 62260
The problem is whatever inside <%# %>
will end up with html encoded.
You might want to try moving the html tag outside of binding.
Home Phone: <strong><%# Item.Person.HomePhone %></strong>
Upvotes: 1
Reputation: 39777
Try this:
<%#:string.Format("Home Phone: <b>{0}</b>",Item.Person.HomePhone)%>
Upvotes: 0