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 trialDan 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
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
231,275 PointsSteven Parker
231,275 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