Friday, 15 February 2013

jquery - ASP MVC PartialView Self reference -



jquery - ASP MVC PartialView Self reference -

i have jquery function reloads div partialview. in order reuse on different views, need pass name of partialview controller. there way name of partialview hosting script?

here how can name of partial hosting script. write in partial view hosting script , can access viewname in jquery function.

<script type="text/javascript"> // view name withought file name extension var viewname = '@path.getfilenamewithoutextension(server.mappath(virtualpath))'; alert(viewname); </script>

jquery asp.net-mvc asp.net-mvc-partialview

No comments:

Post a Comment