This is my action method
- public ActionResult DeleteUserDetails( int UserId )
- {
- var temp = objnsrouteEntities.Users.Where(model => model.UserId == UserId).First();
- objnsrouteEntities.Users.Remove(temp);
- objnsrouteEntities.SaveChanges();
- nsrouteEntities obj = new nsrouteEntities();
- List<DataAccess.User> userlist = obj.Users.ToList();
- List<UserAddress> useraddresslist = obj.UserAddresses.ToList();
- var userdata = from u in userlist
- join uad in useraddresslist on u.UserId equals uad.U_Id into table1
- from uad in table1.DefaultIfEmpty()
- select new UserDetails { userdetail = u, useraddressdetail = uad };
- return View("Dashboard","Home", userdata);
- }
when click on delete button the record is passed in the url and it is getting deleted also
but it is not redirecting to the " DASHBOARD " page
getting this error
Server Error in '/' Application.
The view 'Dashboard' or its master was not found or no view engine supports the searched locations. The following locations were searched:
~/Views/Account/Dashboard.aspx
~/Views/Account/Dashboard.ascx
~/Views/Shared/Dashboard.aspx
~/Views/Shared/Dashboard.ascx
~/Views/Account/Home.master
~/Views/Shared/Home.master
~/Views/Account/Dashboard.cshtml
~/Views/Account/Dashboard.vbhtml
~/Views/Shared/Dashboard.cshtml
~/Views/Shared/Dashboard.vbhtml
~/Views/Account/Home.cshtml
~/Views/Account/Home.vbhtml
~/Views/Shared/Home.cshtml
~/Views/Shared/Home.vbhtml