I would like to create a helper that can be used like
@Html.MyHelperFor(m => m.Name)
this should return for example
<span name="Name" data-something="Name"></span>
if it is @Html.MyHelperFor(m => m.MailID)
This should return
<span name="MailID" data-something="MailID"></span>
I should be able to access the Property name in the helper method to make this type of helper ,I think.
How can I do this?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…