用户登录
用户注册

分享至

链接列表

  • 作者: 曰邢一珊闺蜜
  • 来源: 51数据库
  • 2022-08-17
//First in C# where you create the controller action method 
//to create the method that will populate all content details
//add the following code
public ActionResult Details(int id)
        {
            var repositoryList = _repository.List();
            ViewData["List"] = repositoryList;
            return View(_repository.Get(id));
        }


<!--now is ASP.net add the following in your navigation panel->
 <ul>
     <% foreach (var item in (List<Service>)ViewData["List"])
       {%>
            <% if ((item.isActive) || (item.id != 0)) 
                   { %><li><%=Html.ActionLink(item.Title, "Details", new { id = item.id })%></li><%} %>
       <%} %>
    </ul>
软件
前端设计
程序设计
Java相关