I have created a Datepicker for my Employee Create View and it is working great.
Below is the code;
- "https://ajax.aspnetcdn.com/ajax/jquery.ui/1.10.4/themes/cupertino/jquery-ui.css" rel="stylesheet" />
- @section Scripts {
-
- Server Error in '/' Application.
- Input string was not in a correct format.
- Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
- Exception Details: System.FormatException: Input string was not in a correct format.
- Source Error:
- Line 99: @Html.LabelFor(model => model.DOB, htmlAttributes: new { @class = "control-label col-md-2" })
- Line 100: "col-md-10">
- Line 101: @Html.EditorFor(model => model.DOB, new { htmlAttributes = new { @class = "form-control" } })
- Line 102: @Html.ValidationMessageFor(model => model.DOB, "", new { @class = "text-danger" })
- Line 103:
- Source File: C:\Users\kyle\source\repos\LMKSystem\Views\Employee\Edit.cshtml Line: 101
- Stack Trace:
Below is the html for the DOB field in the Employee Edit view.
- <div class="form-group">
- @Html.LabelFor(model => model.DOB, htmlAttributes: new { @class = "control-label col-md-2" })
- <div class="col-md-10">
- @Html.EditorFor(model => model.DOB, new { htmlAttributes = new { @class = "form-control" } })
- @Html.ValidationMessageFor(model => model.DOB, "", new { @class = "text-danger" })
- div>
- div>
I would like to know how i can click on "Edit" so that the DOB that was captured on the Employee Create View will show in the Employee Edit View?
I have Googled and YouTuded alot and still can't find the answer, please help?
Thanking you in advance.
Regards,
Kyle
Joginder BangerPosted Feb 12, 2020, 12:42 AM
Kyle OliverPosted Feb 12, 2020, 7:38 AM