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!


ANIL SINGH

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...
http://www.code-sample.com
http://www.code-sample.xyz

You Might Also Like
Post a Comment
www.code-sample.com/. Powered by Blogger.