Hi experts,
I want to update the user profile in asp.net MVC but modelstate is not true,
In View Model, I have added all details like
- u_id
- username
- firstname
- lastname
- password
now i only want to update firstname and lastname
I think that's model is not valid
Lkindly give me suggestion/Solution to resolve this

Ketan MokariyaPosted Oct 9, 2021, 3:43 PM
You need to update the existing record of the user profile. You can first retrieve that user details from db so that all userprofile model will have data and then set details which you need to update like firstname and lastname and you can save that info.
You can refer following article for CRUD operation.
https://www.c-sharpcorner.com/article/crud-operation-in-asp-net-mvc2/
Srinivasan RamamoorthiPosted Oct 10, 2021, 8:58 AM
Sachin SinghPosted Oct 10, 2021, 4:55 AM