asp.net mvc - Show Div in another view -


i have navigation cshtml view , index view. nav view on left hand side, , when click item on view want display partial view inside div in index view.

here trying when user selects item in nav view

$.get('home/itemresult/', { id: item.value}, function (data) {             $('#partialplaceholder').html(data);         });     }  

in index have (i commented out html.action (i using that, need pass parameter nav view))

               <table class="tg">                     <tr>                        <th class="tg-031e">                          <div id="partialplaceholder" style="display:none;">                                                              </div>                           @*@html.action("itemresult", "home")*@                         </th>                       </tr>                 </table> 

my layout refernces nav view.

<!-- wrapper-->         <div id="wrapper">              <!-- navigation -->             @html.partial("_navigation")              <!-- page wraper -->             <div id="page-wrapper" class="gray-bg">                  <!-- top navbar -->                 @html.partial("_topnavbar")                  <!-- main view  -->                 @renderbody()                  <!-- footer -->                 @html.partial("_footer")              </div>             <!-- end page wrapper-->          </div> 

it hitting controller action, view not showing in placeholder div. possible? if so, doing wrong?

the style of partialplaceholder contains display:none; means won't see result.

remove offending code.


Comments

Popular posts from this blog

android - MPAndroidChart - How to add Annotations or images to the chart -

javascript - Add class to another page attribute using URL id - Jquery -

firefox - Where is 'webgl.osmesalib' parameter? -