Reputation: 119
Question: when new employee created I have to send mail to the admin. right now mail sending successfully but when admin clicks the link directly it should open the created employee partial view along with partial 1 and partial view 2 for your reference please find below the image.
i dont know how to do this one. right now directly i called the action method Example:
it should call the following action method
which is the best way to call from the email link. Thanks.
Upvotes: 1
Views: 441
Reputation: 571
To answer your question, to call an action using query string, your action should look like the following in your controller:
public ActionResult EmployeeInfo(string query)
{
// use query here
}
However, I suggest create an employee details action and view that would correspond to route like //websitename/employee/details/id.
This view must be tied to a viewmodel that contains all required info about the employee (including the data in partial views).
Upvotes: 1