使用ajax和css下拉

I make a list and make it hyperlink using @Ajax.ActinLink so that on click nested list can be opened using Partial View. When I click on the first list option partial view is displayed but when I click on the second list option, partial view is not opened Here is my code:

<ul id="menu">
           <h3>Categories</h3>
            @foreach (company company in @Model)
            {
              <li>
                   @Ajax.ActionLink(company.COMPANY_NAME, "All", new AjaxOptions()
                   {
                      HttpMethod = "GET",
                      UpdateTargetId = "yr",
                      InsertionMode = InsertionMode.Replace
                   })
                <ul class="sub-menu">
                    <li id="yr"></li>
                </ul>
              </li>  
            }
</ul>

here 2016 and 2017 comes from the partial view but it does not display when i click on the BMW

查看全部
weixin_33712987
weixin_33712987
2017/04/01 14:06
  • css
  • ajax
  • javascript
  • jquery
  • 点赞
  • 收藏
  • 回答
    私信

1个回复