您现在的位置是:首页 >

科研项目指南是什么 ASP.NET项目开发指南:链接管理页面(1)

火烧 2022-09-20 15:31:51 1071
ASP.NET项目开发指南:链接管理页面(1)    管理员界面 链接管理   链接管理页面( )  在管理员主界面中单击 链接管理 超链接 即可在ST_admi a x页面中部右侧加载链接管理页面S

ASP.NET项目开发指南:链接管理页面(1)  

     管理员界面 链接管理

     链接管理页面( )

  在管理员主界面中单击 链接管理 超链接 即可在ST_admin aspx页面中部右侧加载链接管理页面ST_admin_link aspx 如图 所示

图   链接管理页面

   ST_admin_link aspx的HTML主要代码

  ST_admin_link aspx的HTML主要代码如程序 所示

  程序   ST_admin_link aspx

     <form id= Form method= post runat= server >

     <table width= % border= cellpadding= cellspacing=

         ST_bgcolor= #f f f >

     <tr>

         <td height= >后台管理 &gt;链接管理</td>

     </tr>

     <tr>

         <td ST_bgcolor= #ffffff >

     <! GridView控件 >

     <asp:GridView id= LinkList runat= server

  AutoGenerateColumns= False

             Width= % >

             <! 列 >

         <Columns>

         <! 模板列 >

         <asp:TemplateField>

             <HeaderTemplate>

             <table Width= % border=

  cellpadding= cellspacing=

                 class= table >

                 <tr>

                 <td width= % height= >

                     <div align= center >选项</div>

                 </td>

                 <td width= % height= >

                     <div align= center >站点名</div>

                 </td>

科研项目指南是什么 ASP.NET项目开发指南:链接管理页面(1)

                 <td width= % height= >

                     <div align= center >url地址</div>

                 </td>

                 <td width= % height= >

                     <div align= center >管理</div>

                 </td></tr>

             </table>

             </HeaderTemplate>

             <ItemTemplate>

             <table width= % border=

  cellpadding= cellspacing=

                 class= table >

                 <tr>

                 <td height= width= % >

                     <div align= center >

                     <input type= checkbox

  name= checkbox value= <%#

                         Eval( ST_l_id ) %> >

                     </div>

                 </td>

                 <td height= width= % >

                     <div align= center ><%#

  Eval( ST_l_name ) %></div>

                 </td>

                 <td height= width= % >

                     <div align= center ><%#

  Eval( ST_l_url ) %></div>

                 </td>

                 <td height= >

                     <div align= center ><a

             href= ST_edit aspx?action=dellink&id

  =<%# Eval( ST_l_id ) %>

             onclick= return confirm( 确定删除 ) >删除</a></div>

                 </td></tr>

             </table>

             </ItemTemplate>

         </asp:TemplateField>

         </Columns>

     </asp:GridView></td>

     </tr>

     </table>

     <table width= % border= align= center cellpadding=

     cellspacing= ST_bgcolor= #f f f >

     <tr>

         <td height= >添加链接</td>

     </tr>

     <tr>

         <td ST_bgcolor= #ffffff >&nbsp;

  <FONT face= 宋体 >站点名 </FONT>

         <asp:TextBox id= l_name runat=

  server ></asp:TextBox><FONT face=

             宋体 >站点URL:</FONT>

         <asp:TextBox id= l_url runat= server ></asp:TextBox>

         <asp:Button id= Button runat= server Text= 添加

             onclick= Button _Click ></asp:Button></td></tr>

     </table>

     </form>

  【代码说明】此页面用了一个GridView控件和一个 添加 按钮 代码第 ~ 行的GridView控件用来向用户展示已有的链接信息 同时代码第 ~ 行提供删除链接信息的操作 代码第 ~ 行的 添加 按钮 则用来提供添加新链接信息的操作

  说明 GridView的宽度设置为width= % 表示占当前表格宽度的 %

      返回目录ASP NET项目开发指南

      编辑推荐

       ASP NET MVC 框架揭秘

       ASP NET开发宝典

lishixinzhi/Article/program/net/201311/15885  
永远跟党走
  • 如果你觉得本站很棒,可以通过扫码支付打赏哦!

    • 微信收款码
    • 支付宝收款码