TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
yash patel
1.4k
282
20.8k
Getting error for page redirect
Oct 2 2020 1:42 AM
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
Reply
Answers (
1
)
Deserialize json string into object in c#
Can I use Console.ReadLine () inside object initialiser