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

Posted by Raja under ASP.NET MVC category on | Points: 40 | Views : 20415
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.


Comments or Responses

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

Login to post response