Set Default Value to @Html.TextBoxFor MVC 5

Set Default Value to @Html.TextBoxFor MVC 5

Syntax for email text value

@Html.TextBoxFor(m => m.Email, new { @Value =ViewBag.Email })

Syntax for date type value

@Html.TextBoxFor(m => m.Date, new { @Value = ViewBag.Date, @Type = "date" })

Hope this help!


Hey! I'm Anil Singh. I author this blog. I'm Active Blogger, Programmer. I love learning new technologies, programming, blogging and participating the forum discussions more...
My Blogs - and
My Books - Interview Questions and Answers Books- Get Your Book in 15+ Digital Stores Worldwide..

You Might Also Like Powered by Blogger.
ASK Questions