Using bootstrap for customizing MVC Actionlink looks to HTML button

Bootstrap is a powerful  html, css and JavaScript framework which you can use for building responsive web/mobile projects. you can get more information on it here.In the below post we will apply the bootstrap css on the MVC action link generate html and change its display like a button. I am assuming that you have an default CURD views are already created.

First of all you need to install it using Package Manager console as below:-

image

It will log message that the bootstap is successfully added

image

Now we need to include the bootstrap css file to the MVC view so that it can be applied when view it rendered on browser. I am including it on bundleconfig.cs file as below.

image

Now go to the view page(cshtml or vbhtml) where you want to apply some of the default css on the link to make it look like button and update it as below.

image

Run the MVC project and go to the view , it will display the link as below

image

Hope you find this post useful. Thanks for reading.

Advertisements

One thought on “Using bootstrap for customizing MVC Actionlink looks to HTML button

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s