Closed fairking closed 7 years ago
Try specifying the generic type parameters of the AddStaticClass()
method like this (where ViewModel
is whatever your model type for the view is):
@(Html.Bootstrap() .FormGroup() .AddChild(Html.Bootstrap().ControlLabel(x => x.H_TestDisplayStringValue).SetMd(4)) .AddChild(Html.Bootstrap().FormControl().AddStaticClass<MvcBootstrapConfig<ViewModel>>().SetMd(7) .AddContent(Html.DisplayFor(x => x.H_TestDisplayStringValue)) ) .AddChild(Html.Bootstrap().BadgeTooltip("Test Display").SetPullRight()) )
Getting rid of these ambiguous extension method resolution errors was a big problem a while back. I was able to squash almost all of them, but in complicated cases like this you sometimes have to give it a little hint.
Please reopen this issue if it looks like this suggestion doesn't work for you.
I receive an error in following razor:
@(Html.Bootstrap() .FormGroup() .AddChild(Html.Bootstrap().ControlLabel(x => x.H_TestDisplayStringValue).SetMd(4)) .AddChild(Html.Bootstrap().FormControl().AddStaticClass().SetMd(7) .AddContent(Html.DisplayFor(x => x.H_TestDisplayStringValue)) ) .AddChild(Html.Bootstrap().BadgeTooltip("Test Display").SetPullRight()) )
Message:
How can resolve the conflict of namespaces?
Thanks.