1

enter image description here

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

  1. //websitename/seachcountry
  2. //websitename/listofemployee
  3. //websitename/emplyesearchbyid

which is the best way to call from the email link. Thanks.

2
  • Is there already a view containing all these partial views and a single viewmodel tied to this view that has all the required info? Commented Sep 9, 2017 at 7:23
  • it depends on how you are displaying employee details. As @corix010 asked, do you have a container view with these partial views or do you have a separate employee details view, where you render just the Partial View 3? Commented Sep 9, 2017 at 7:40

1 Answer 1

1

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).

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.