Tech
Forums
Jobs
Books
Events
Live
Interviews Prep
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
7
Reply
How to Clear Model Property value in mvc
Dr.Ajay Kashyap
Dec 20 2016 6:52 AM
457
Reply
i want to clear the value of categoryid when redirect to the page
Model:-
public class AddBusinessLocationViewModel
{
public Nullable<int> City_Id { get; set; }
public Nullable<int> CityArea_Id { get; set; }
public Nullable<int> state_id { get; set; }
public string OpenTime { get; set; }
public List<int> CategoryId { get; set; }
}
Controller:-
{
ModelState.Clear(); //this will clear all value
return View(BVM);
}
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
7
)
Next Recommended Forum
Kill SQL Server Sleeping Connections
how to get twitter data like ,share , count etc