How do I add a css class to the TempData output?
Posted
by Pete
on Stack Overflow
See other posts from Stack Overflow
or by Pete
Published on 2010-04-28T15:28:47Z
Indexed on
2010/04/28
15:33 UTC
Read the original article
Hit count: 208
asp.net-mvc
The TempData output is plain text and putting a div around it will leave a formatted but empty div on the screen if there is no TempData.
Is there a way to apply a class to it so that it only shows when the TempData item is set?
Other than writing the div code into the TempData, which seems like a horrible idea.
© Stack Overflow or respective owner