0

In my project, there are five navigation links, represented using @html.ActionLinks as Partial view.Every link represents a different page. When the user is at first page all the links should be disabled

when the user is directed to second page on clicking a button, only first link becomes active and other all links remain inactive.

In every view I am calling this partial view by @html.RenderPartial("_partialViewName")

So how can I change the behavior of ActionLinks dynamically in a controller?

Himani
  • 153
  • 20
  • 1
    action link renders as an "a" tag on the page. Just use jquery on click events to disable/enable the "a" tags as needed – Matt Bodily Sep 08 '14 at 13:52
  • Hi Matt, I suppose this again needs 5 different views. My idea is to have only one partial view, which I would render in five action views(.cshtml page) and change the behavior of Actionlinks dynamically using code behind. Is there any way to implement this way? – Himani Sep 10 '14 at 08:49
  • here is a link for disabling a link with jquery http://stackoverflow.com/questions/970388/jquery-disable-a-link – Matt Bodily Sep 10 '14 at 13:35
  • Thanks Matt.This helped me – Himani Sep 11 '14 at 13:13

0 Answers0