Category Archives: Bootstrap

Yamm For Bootstrap

Yamm for Bootstrap is a Bootstrap menu system that lets you incorporate Bootstrap components into your menus.

Bootstrap and Transitions

For those of you who use Twitter Bootstrap at all, you may have come across this problem already. If you haven’t seen this issue, here is an explanation so you know what to expect if it does happen. I found an issue where Bootstrap transitions interfere with my later transitions. Here is a fix to make your transitions stick to your elements.

Let MVC Concatenate For You

We have all encountered the situation where we want to show user information on a form. Most people have a FirstName and a LastName (unless you’re Prince or Bono). Here is a way to quickly and easily concatenate MVC ViewModel fields without having to use String.Format.

MVC Razor Boolean EditorTemplate With Bootstrap Formatting (Updated)

In my post – MVC Razor Boolean Formatting – I talked about using Editor Templates to globally use Bootstrap boolean controls in your MVC application. With the Bootstrap v3 release, that code has become obsolete. So, in the interests of correctness, I thought it necessary to show updated code.

@model bool?

@{
// make use of MVC4 nullable class attribute values
var yesSelected = […]

Bootstrap Modals Made Even Easier

Anyone who has used Bootstrap would have probably used modals. A modal is a window that “pops up” as a result of some kind of event on the page. Modals are great for CRUD operations where you want to edit a record in a grid or even to provide some form of response to the page. The source code to instantiate a modal is fairly self-explanatory but it is wordy. Well, I came across this library which makes implementing Bootstrap […]

Handling Checkbox Groups in MVC4

I recently had some work that required a series of checkboxes to be displayed in a view that relate to permissions for a user. The use case was that a user could be a member of one or many groups and those groups determined the level of access within the system. The view needs to render a table similar to the one below.

To make this happen, I have a ViewModelRole object which stores all roles from the database. These roles […]

MVC Checkbox and Bootstrap

Bootstrap v3 has some very nice implementations of boolean selectors. You can read the documentation here – http://getbootstrap.com/javascript/#buttons.

I have modified the default functionality to incorporate some formatting. More importantly, I have a small block of javascript that will make MVC integration much easier. It’s also generic enough to have in a global javascript file which you can apply across your entire site.

Here are the details. Firstly, let’s look at the HTML in the MVC view. This block includes some Razor […]

MVC Razor Boolean EditorTemplate With Bootstrap Formatting

EDITOR NOTE: This approach is obsolete since the release of Bootstrap v3. See this post for more details.

The bootstrap btn-group “toggle” functionality is quite nice and very intuitive. Here is an EditorTemplate for MVC that will format all boolean model fields as Bootstrap button groups.