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

Popular posts from this blog

java - UnknownEntityTypeException: Unable to locate persister (Hibernate 5.0) -

python - ValueError: empty vocabulary; perhaps the documents only contain stop words -

ubuntu - collect2: fatal error: ld terminated with signal 9 [Killed] -