css - How to I add an element style to text in a viewbag in asp.net MVC? -
i want add element-style text , value in viewbag. how go this?
this is code
viewbag.title = "order no:" + " " + model.orderid; and want make bold on view screen. should come out example: order no: 5.
i add styles tags bold text, in case i'm clueless on do.
try put viewbag.title in span or label tag , apply styles on it.
<span style="font-weight:bold;">viewbag.title</span> or can directly put in <b> tag
<b>viewbag.title</b> in c# code:
viewbag.error = "hi, <b>bold</b>" instead of <b> can put span or label style want. in view:
@html.raw(viewbag.error)
Comments
Post a Comment