Click here to Skip to main content
15,891,567 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i need to know that how to bind value in html text box in mvc from database.

i am using datepicker in that input type textbox.

HTML
<input type="text" name="objmember.BirthDate" data-beatpicker="true" class="span4" />

i am able to submit the value from this textbox in database field but while edit it i need to already show the date in this input type text box.on the other hand other textbox are showing the value fine.

C#
@Html.TextBoxFor(m => m.objmember.Name, new { placeholder = "Name", @class = "span4" })

i am using viewModel in this view.but writing
HTML
name="objmember.BirthDate"
is not binding the value with this textbox.

above default textbox of mvc works fine with it.but on using input type text it is not binding the value. i have to use this datepicker in input type field because it is not working with @Html.Textbox.

Please give me some solution to this problem.
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900