Closed AreebaAroosh closed 10 years ago
you can set label's text to be empty. That's won't get rid of the label, but might be good enough for you
I tried that, but if the LabelText is set to null or empty string, it displays the model property name.
do you have latest? It should work fine with empty string. Also, if you have latest and it does not work, show me you code
It is working.
How to write this using BMVC, (specifying image file for icon)
<div class="form-group">
<div class="input-group">
<span class="input-group-addon">
<img src="~/Content/images/key.png" width="14" alt="" />
</span>
<input type="password" class="form-control" id="password" name="password" placeholder="Password">
</div>
</div>
@(f.FormGroup().PasswordFor(x => x.Password) .Placeholder("Password") .PrependIcon(???????) .Label().LabelText(""))
There is no way to specify to use tag with BMVC. You can create a css rule like
.my-icon {
backround: url('~/Content/images/key.png')
}
and then use it in BMVC helper: .PrependIcon("my-icon")
I assume this can be closed
Using FormGroup().TextBoxFor, how can I generate the textbox without Label?