Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial![](https://ecs-static.teamtreehouse.com/assets/views/marketing/shared/community-banner-white-47072046c51352fe6a69f5e691ff5700b28bb11d45197d7bdf066d9ea3f72d0c.webp)
![Dan Comperini](https://secure.gravatar.com/avatar/c3668565fa165c534846e7a9b4cc9564?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Dan Comperini
Courses Plus Student 2,215 PointsA better way to show the bootstrap alert
The final 'Using TempData' example should have combined the check for null data with the dismissable alert. As coded, a null message will display an empty button on the screen.
@if (TempData["Message"] != null)
{
<div class="alert alert-success alert-dismissible" role="alert">
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
@TempData["Message"]
</div>
}
1 Answer
![James Churchill](https://secure.gravatar.com/avatar/d8535c0ae6b55d2cee2d9ff5a46ab53b?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
James Churchill
Treehouse TeacherDan,
Thanks for taking the time to provide feedback on the course!
The code that you provided above looks like what was shown in the video. Maybe I'm overlooking something?
Thanks ~James
Steven Parker
230,688 PointsSteven Parker
230,688 PointsIt's not clear if you are asking a question here.
Or are you sharing something you discovered? Please elaborate a bit more.
And be sure to format your code using the instructions from the Markdown Cheatsheet found below the "Add an Answer" area![:arrow_heading_down: :arrow_heading_down:](https://image-proxy-cdn.teamtreehouse.com/3aa59b0d69e23b437da3548709632c5164e6e39c/68747470733a2f2f7374617469632e7465616d74726565686f7573652e636f6d2f696d616765732f656d6f6a692f756e69636f64652f323933352e706e67)