0

I have 3 html anchor tags.

depending on what link is clicked, i want to render the same view, but pointing to a different controller action.

How would i render the partial view and point the view to a different action on the same controller.

SetiSeeker
  • 6,482
  • 9
  • 42
  • 64

1 Answers1

1

Use RenderAction().

 @Html.RenderAction("Details", "User", new {id = Model.Id})

Some help about how to render partial views.

This post on StackOverflow explains the difference between Html.Action and Html.RenderAction, that may interest you.

UPDATE:

For doing this in JavaScript I redirect you to this question: How to call Html.RenderAction() with parameters declarated in jscript?

Community
  • 1
  • 1
glautrou
  • 3,140
  • 2
  • 29
  • 34