asp.net mvc 4 - MVC Returning to a view and showing the partial view that was there -


alright, working mvc 4 make web app. still new mvc , have hit road blocks , got past them, having trouble finding answer current problem.

my main view, course, has several partial views, allcourses , currentcourses, user can switch between couple links. displays list of courses database mainly, links change display based on date. course view has button takes them entirely new view, details, displays content course. in details view there return link takes me previous view, course.

what need return link take them previous view, display partial view showing when clicked view course details, aka if on allcourses partial view when return want partial view show , same if on currentcourses.

edit::

my partial views in main view handled by:

<ul id="view-options">     <li><a href="javascript:getall();">view </a></li>     <li><a href="javascript:getcurrent();">view current</a></li> </ul> <script type="text/javascript">     function getall() {         $("#result").load("@url.action("allcourses", "course")");     } </script> <script type="text/javascript">     function getcurrent() {         $("#result").load("@url.action("currentcourses", "course")");     } </script>  <div id="result"> . . </div> 

just 2 text links switch between views.

and link details view is:

<input type="button" class="button" value="view course" onclick="location.href='@url.action("details", new { id = item.courseid })'" /> 

the call main view similar above.

any thoughts?

so need add paging view. ended adding filter page , went pagedlist.mvc , got rid of partial views.


Comments

Popular posts from this blog

PHP DOM loadHTML() method unusual warning -

python - How to create jsonb index using GIN on SQLAlchemy? -

c# - TransactionScope not rolling back although no complete() is called -