国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 網站 > 建站經驗 > 正文

AS P.NET列出數據庫活躍鏈接的方法

2019-11-02 15:41:46
字體:
來源:轉載
供稿:網友

         本文實例講述了ASP.NET列出數據庫活躍鏈接的方法。分享給大家供大家參考。具體分析如下:

         這里列出數據庫的活躍鏈接。主要使用geeric列表和一個貯存器,創(chuàng)建一個泛型列表的鏈接,如果他們是活躍的,那么他們將顯示在導航了。

? 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 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> <%
4567電影網[www.aikan.tv/special/4567dianyingwang/]
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>

          希望本文所述對大家的asp.net程序設計有所幫助。

發(fā)表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發(fā)表
主站蜘蛛池模板: 咸宁市| 大理市| 七台河市| 册亨县| 陕西省| 钟祥市| 连山| 康乐县| 塔河县| 阿荣旗| 苏尼特右旗| 临泉县| 泸西县| 平塘县| 永州市| 濮阳县| 金秀| 山阳县| 松潘县| 海门市| 特克斯县| 梓潼县| 辽阳县| 祁连县| 黄浦区| 遂宁市| 双柏县| 咸阳市| 尼勒克县| 新安县| 绵竹市| 衡山县| 万宁市| 荔浦县| 黑龙江省| 长岛县| 六枝特区| 凉城县| 哈尔滨市| 荆州市| 郴州市|