0

I could be looking at this completely wrong, and I'd normally just do this with jQuery, but the topic of Progressive Enhancement has sparked this up.

At the minute I have:

<button data-bind="click: moveNext"><a href="#anchorTwo">Next</a></button>

<section id="anchorTwo">
</section>

And moveNext (Knockout.js) will hide/show this function.

However, with Progress Enhancement, this is not possible. So I thought, stick it as an ActionLink and hide/show the section via this (I've just moved from Web Forms). Obviously an ActionLink has to have its own View/PartialView - so is this even possible via MVC?

Literally all I want is the code-behind to hide/show an element.

Chris Dixon
  • 9,147
  • 5
  • 36
  • 68
  • 3
    There is no notion of "code-behind" in MVC. The server side cannot show or hide an element because there is no ViewState. You can post to a controller that responds with "hide" or "show".. but then, that kinda defeats the purpose when you would normally do that client-side.. – Simon Whitehead Nov 22 '12 at 09:55
  • I had a fear that'd be the case, as it's going to make "progressive enhancement" a whole lot more tedious. Thank you for your answer :) – Chris Dixon Nov 22 '12 at 11:09

0 Answers0