asp.net-mvctwitter-bootstraprazorgeneratorrazor-declarative-helpers

challenges in upgrading Bootstrap Themed ASP MVC site, how to upgrade bootstrap + keep previous CSS / @Helper / Transpiler


I've built an ASP MVC site and used bootstrap, Jquery, knockout and signalR, and inherited a mix of 3rd party MVC code integrated with controls like syncfusion. (I don't have a choice in this matter, company decision)

After coding the HTML helpers in the views,

I manually applied all the bootstrap styles took sometime and got it to work. Now, with upgrade/changes to bootstrap (RC 3.1) I am finding myself back to square one, hunting through the code and replacing it manually, lots of changes. Can you please share a better way to transpile/emit/bind the bootstrap CSS classes into the helpers (i.e. in an independent way of the technology helper, whether its ASP HTML MVC helper, Syncfusion HTML MVC helper, Rad or FluentBootStrap)

Please provide a solution/recommendation to apply bootstrap CSS to ASP MVC pages

Here is an example of what I do currently, with the Syncfusion library

@Html.Syncfusion().Menu("myMenu").AutoFormat((Skins)ViewData["Themes"]) - performance hog       

or better option 2 below

http://mvc.syncfusion.com/demos/ui/tools/Menu/Appearance

@(Html.Syncfusion().Button("btnNormal")
                        .Text("Save")
                        .Width(100)
                        .Height(50)
                        .ContentType(ContentTypes.TextAndImage)
                        .ImageUrl(Url.Content("~/Content/Images/Button/icon_save.png"))
                        .CustomCSS("CustomCss_Button") )  

-> I changed/upgraded manually to BootStrap RC 3.1, I changed this last part to the bootstrap

.CustomCSS("btn-default dropdown-toggle btn-primary"))  

Solution

  • Not sure this would be helpful to you, but check out TwitterBootstrapMVC. Right now it supports v2.* of TwitterBootstrap, but the support for v3.* is being built.