Open MukulSah opened 1 year ago
The URL has been incorrectly defined. The controller and the action name shouldn't be in the curly bracket "Customers/Details/{id}". The entities that are variable-like parameters are inside curly brackets while the controller and action here are fixed in this case
The URL has been incorrectly defined. The controller and the action name shouldn't be in the curly bracket "Customers/Details/{id}". The entities that are variable-like parameters are inside curly brackets while the controller and action here are fixed in this case
Thnxx bro
i have added the routing [Route ("Customers/Details/{id}")] public ActionResult Details(int id) { var customer = _context.Customers.SingleOrDefault(c =>c.Id == id);
still it didnt work also i applied Route.MapRoute( name: "Details", url: "{Customers}/{Details}/{id}", defaults: new { controller = "Customers", action = "Details", id = UrlParameter.Optional } );
this also didnt worked it is giving the error of Server Error in '/' Application. The resource cannot be found. and url is something like this http://localhost:50904/Customers/Details?Length=9
when im redirecting it http://localhost:50904/Customers/Details/1 it is giving me the error of Server Error in '/' Application. The model item passed into the dictionary is of type 'Aura.Models.Customer', but this dictionary requires a model item of type 'Aura.ViewModels.RandomMovieViewModel'.