Display Date in edit mode in asp.net mvc
By Junaid A   Posted on March-29-2023
Display Date in edit mode in asp.net mvc
1- In database table data type is Date e.g date_invoice
2- in DTO or class property is as below
public DateTime date_invoice { get; set; }
3- in html view html is like this
@Html.TextBoxFor(model => model.date_invoice, "{0:yyyy-MM-dd}", new { @class = "form-control", type = "date" })
Moslty Date is not dispalyed in edit mode reason is format of date that is "{0:yyyy-MM-dd}" and type of box is date
- Date issue in edit mode in asp.net mvc
- Date formatting
- Date format
- Display date in edit mode.
By asifjans   29-Mar-2023
Views 41
Share This with your friend by choosing any social account
You may also read following recent Post
![]() |
How old are you and what is your net worth? Also, what is your educational background and what sort of a job do you do? Do you enjoy your work?
16 By Naumanshafi |
![]() |
create appointment booking page with available time slot using database ms sql server
29 By Junaid A |
![]() |
what is Asp.Net Core
43 By Junaid A |
![]() |
publish has encountered an error Object reference not set to an instance of an object A diagnostic log has been written to following location
58 By Junaid A |
![]() |
The provided URI scheme 'http' is invalid; expected 'https'." & vbCrLf & "Parameter name: via
76 By Junaid A |
![]() |
C# Language Basics
1580 By |
![]() |
Crud in Asp.NET using tabs
601 By Haider |
![]() |
Parser Error
667 By Usman Jafar |
![]() |
What are 3 C
160 By |
![]() |
what is .net
388 By |
![]() |
How to post uploaded file and form data in MVC using jquery?ts Common scenario where you want to pos
196 By |
![]() |
MVC url routing
231 By |
![]() |
Learn about Session
259 By |