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
Karan Thakkar
1.5k
204
89.9k
How redirect to different view of same controller class?
May 4 2019 8:57 AM
I have a ActionMethod which I called on Submit button
public Submit ActionResult(Employee emp)
{
emp object has all data like name,emailid, mobileNo etc
--calling business layer to insert data in database
i want to return a view here which is of same controller class I tried it in following ways
return view("ViewName",emp);
in this case i dont have any action name and I redirected to view successfully
but the problem is when I refresh that view it hits to Submits and again entry is made in
database.
return RedirectToAction("ActionName",ViewName,emp);
here i have action which redirects to same view i.e "ViewName"
but in this case it fails to redirect
}
Thanks.
Reply
Answers (
5
)
How to get to know groupbox count in windows form
json related questions