Closed mhoedeman closed 11 years ago
This is done in the newest version. Be careful with updating to a new version. There are couple of breaking changes. For all changes see CodeProject article The website to download license for TB3 (In case you would like to switch) is www.twitterbootstrapmvc.com
Add a condition boolean to the .Disabled Extention Method so we can rewrite if (Model.HasConfig) { @Html.Bootstrap().ActionLinkButton("txt", MVC.x.Config())} else { @Html.Bootstrap().ActionLinkButton("txt", MVC.x.Config()).Disabled()}
to: @Html.Bootstrap().ActionLinkButton("txt", MVC.x.Config()).Disabled(!Model.HasConfig)
Example is for button but I assume this is handy everywhere .Disabled() is used as an extention method in BMVC.
See http://www.codeproject.com/Messages/4626151/Conditional-Fluent.aspx