Setting default value for Html.Textboxfor in ASP.NET MVC

Raja
Posted by Raja under ASP.NET MVC category on | Points: 40 | Views : 14082
To set the default value for TextBoxFor, write below code.

            @Html.TextBoxFor(m => m.ListingOrder, new { Value = "0" })


Notice the Value attribute in the bold in above code snippet.

Thanks

Comments or Responses

Posted by: Mangalagiri on: 11/28/2014 Level:Starter | Status: [Member] | Points: 10
Nice solvent...

Login to post response