0

I'm trying to create this html code:

<input id="RememberMe" type="checkbox" name="RememberMe" />
<label for="RememberMe">
<span></span>
Remmember me.
</label>

with mvc tools. So I'm wrote:

@Html.CheckBoxFor(m => m.RememberMe)
@Html.LabelFor(m => m.RememberMe)

But this not creating the element inside the label.

How I'm can use those mvc tools, without losing this span?

thank you!

Is that possible?

Daniel A. White
  • 181,601
  • 45
  • 354
  • 430
No1Lives4Ever
  • 5,590
  • 13
  • 64
  • 117
  • You can create custom HTML helper. Has already been answered here. http://stackoverflow.com/questions/5196290/how-can-i-override-the-html-labelfor-template?lq=1 – ACS Sep 30 '13 at 18:46

1 Answers1

0

you can try html raw if all you need is to have a span

@Html.Raw(m => m.RememberMe)
COLD TOLD
  • 13,299
  • 3
  • 33
  • 51