熱點推薦:
您现在的位置: 電腦知識網 >> 編程 >> .NET編程 >> 正文

用戶信息的查看、修改和刪除[1]

2022-06-13   來源: .NET編程 
    ——此文章摘自《ASPNET +SQL Server網絡應用系統開發案例精解》定價 特價 詳細>>http://tracklinktechcn/?m_id=dangdang&a_id=A&l=&l_type= width= height= border= nosave>

    單擊用戶管理即可進入用戶管理界面STManagerLoginaspx如圖所示

http://developcsaicn/dotnet_ASP/images/gif>
  用戶管理界面

    .TManagerLoginaspx的HTML主要代碼

    DataGrid控件用來向用戶展示已有的用戶信息同時提供添加修改和刪除用戶信息的操作
    <!—注冊用戶控件>
    <%@ Register TagPrefix=uc TagName=STManagerMiddle Src=/STControls/STManagerMiddleascx%>
    <%@ Register TagPrefix=uc TagName=STManagerHeader Src=/STControls/STManagerHeaderascx %>
    <%@ Register TagPrefix=uc TagName=STFooter Src=/STControls/STFooterascx %>                  
    <!—引用控件>
    <uc:stmanagerheader id=STManagerHeader runat=server></uc:stmanagerheader>
    <TABLE id=Table style=ZINDEX: ; LEFT: px; TOP: px; HEIGHT: px cellSpacing=
             cellPadding= width= align=center border=>
             <TR>
                       <TD style=WIDTH: px vAlign=top align=center><uc:stmanagermiddle id=STManagerMiddle runat =server></uc:stmanagermiddle><FONT face=宋體></FONT></TD>
                       <TD vAlign=top align=center><FONT face=宋體>
            <!—DataGrid控件>
    <asp:datagrid id=STmyGrid runat=server OnPageIndexChanged=STmyGrid_Page AllowPaging=True
                                                   PageSize= AutoGenerateColumns=False OnCancelCommand=STmyGrid_cancel OnDeleteCommand=STmyGrid_delete OnEditCommand=STmyGrid_edit
                                                   OnUpdateCommand=STmyGrid_update DataKeyField=STUserID Width=%>
                                                   <!—列>
                                                   <Columns>
                                                            <asp:BoundColumn DataField=STUserID HeaderText=用戶ID></asp: BoundColumn>
                                                            <asp:BoundColumn DataField=STNickName HeaderText=登錄名稱></asp: BoundColumn>
                                                            <asp:BoundColumn DataField=STUserPwd ReadOnly=True HeaderText=用戶密碼 DataFormatString=******></asp:BoundColumn>
                                                            <asp:BoundColumn DataField=STUserName HeaderText=真實姓名></asp: BoundColumn>

right>[]  [http://developcsaicn/dotnet_ASP/htm>]  [http://developcsaicn/dotnet_ASP/htm>]  [http://developcsaicn/dotnet_ASP/htm>]  [http://developcsaicn/dotnet_ASP/htm>]  


From:http://tw.wingwit.com/Article/program/net/201311/15195.html
    推薦文章
    Copyright © 2005-2022 電腦知識網 Computer Knowledge   All rights reserved.