ASP.NET: Change page title based on database to which you're connecting
On occasion, you may find it useful to provide a visual cue that the user is not in an application's production environment. This is especially useful during a late night crunch when the developers, system administrators, and the Q.A. team are distracted and tired. Below is some code which allows you to change the page title and its style based on the database specified in a connection string. Note that we are parsing an Entity Framework connection string, not an ADO.NET connection string. Site.Master <div class="navbar navbar-inverse navbar-fixed-top"> <div class="container"> <div class="navbar-header"> <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse"> <span class="icon-bar"></span> <span class="...