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
Anshu Kumar
NA
1.2k
22.2k
Calling Action from View
Jul 31 2014 7:02 AM
How to call an action method from view hyperlink or button. Action method have few input parameters.
I tried to call the view from hyperlink to fill the Model and populate the view respectively.
@Html.ActionLink("GetEmployee","GetEmpView","Employee",new {@empid= 1001, @fstname="Anshu",@lstname="Singh"}, null)
public ActionResult GetEmpView(int empid, string fstname, string lstname)
{
EmployeeModels emp1 = new EmployeeModels();
emp1.EmployeeID = empid;
emp1.FirstName = fstname;
emp1.LastName = lstname;
return View(emp1);
}
Reply
Answers (
1
)
In MVC4 application ineed to bind table column valuesin grid
how to create paging in table in mvc 5