I just want to apply style like "margin-top :10px" on LabelFor In MVC like below syntax.
@Html.LabelFor(m => m.UserName)
Any can suggest that how can I do this.
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Abhishek YadavPosted Oct 22, 2022, 1:54 AM
@Html.LabelFor(m => m.UserName,new{@style="margin-top:10px;"})
Satyaprakash SamantarayPosted Nov 11, 2017, 12:52 AM
Using @ you can write C# within HTML and with @ also you may write HTML within C#.
Ramesh PalanivelPosted Nov 11, 2017, 12:52 AM
SandyPosted Nov 11, 2017, 12:45 AM
Satyaprakash SamantarayPosted Nov 10, 2017, 3:14 PM
Suresh KumarPosted Nov 10, 2017, 11:58 AM
Manas MohapatraPosted Nov 9, 2017, 6:26 AM
Ramesh PalanivelPosted Nov 9, 2017, 5:39 AM