温馨提示:代码在线浏览功能只能做为源码浏览参考,如果想更进一步了解该代码请下载:简单新闻管理系统(Access数据库)源码
当前文件:
AccessNews/Admin/Admin.aspx[5K,2009-6-12 11:31:25],打开代码结构图
AccessNews/Admin/Admin.aspx[5K,2009-6-12 11:31:25],打开代码结构图1<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Admin.aspx.cs" Inherits="Admin_Admin" %> 2
3
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 4
5
<html xmlns="http://www.w3.org/1999/xhtml" > 6
<head runat="server"> 7
<title>无标题页</title> 8
</head> 9
<body> 10
<form id="form1" runat="server"> 11
<div> 12
<asp:AccessDataSource ID="AccessDataSource1" runat="server" ConflictDetection="CompareAllValues" 13
DataFile="~/App_Data/news.mdb" DeleteCommand="DELETE FROM [Admin_Info] WHERE [Admin_Id] = ? " 14
InsertCommand="INSERT INTO [Admin_Info] ( [Admin_Name], [Admin_Pwd]) VALUES (?,?)" 15
OldValuesParameterFormatString="original_{0}" SelectCommand="SELECT * FROM [Admin_Info]" 16
UpdateCommand="UPDATE [Admin_Info] SET [Admin_Name] = ?, [Admin_Pwd] = ? WHERE [Admin_Id] = ? "> 17
<DeleteParameters> 18
<asp:Parameter Name="original_Admin_Id" Type="Int32" /> 19
<asp:Parameter Name="original_Admin_Name" Type="String" /> 20
<asp:Parameter Name="original_Admin_Pwd" Type="String" /> 21
</DeleteParameters> 22
<UpdateParameters> 23
<asp:Parameter Name="Admin_Name" Type="String" /> 24
<asp:Parameter Name="Admin_Pwd" Type="String" /> 25
<asp:Parameter Name="original_Admin_Id" Type="Int32" /> 26
<asp:Parameter Name="original_Admin_Name" Type="String" /> 27
<asp:Parameter Name="original_Admin_Pwd" Type="String" /> 28
</UpdateParameters> 29
<InsertParameters> 30
<asp:Parameter Name="Admin_Id" Type="Int32" /> 31
<asp:Parameter Name="Admin_Name" Type="String" /> 32
<asp:Parameter Name="Admin_Pwd" Type="String" /> 33
</InsertParameters> 34
</asp:AccessDataSource> 35
36
</div> 37
<asp:FormView ID="FormView1" runat="server" AllowPaging="True" DataKeyNames="Admin_Id" 38
DataSourceID="AccessDataSource1" BackColor="White" BorderColor="#999999" BorderStyle="None" BorderWidth="1px" CellPadding="3" GridLines="Vertical"> 39
<EditItemTemplate> 40
管理员Id: 41
<asp:Label ID="Admin_IdLabel1" runat="server" Text='<%# Eval("Admin_Id") %>'></asp:Label><br /> 42
管理员名: 43
<asp:TextBox ID="Admin_NameTextBox" runat="server" Text='<%# Bind("Admin_Name") %>'></asp:TextBox><br /> 44
管理员密码: 45
<asp:TextBox ID="Admin_PwdTextBox" runat="server" Text='<%# Bind("Admin_Pwd") %>'></asp:TextBox><br /> 46
<asp:LinkButton ID="UpdateButton" runat="server" CausesValidation="True" CommandName="Update" 47
Text="更新"></asp:LinkButton> 48
<asp:LinkButton ID="UpdateCancelButton" runat="server" CausesValidation="False" CommandName="Cancel" 49
Text="取消"></asp:LinkButton> 50
</EditItemTemplate> 51
<InsertItemTemplate> 52
管理员名: 53
<asp:TextBox ID="Admin_NameTextBox" runat="server" Text='<%# Bind("Admin_Name") %>'></asp:TextBox><br /> 54
管理员密码: 55
<asp:TextBox ID="Admin_PwdTextBox" runat="server" Text='<%# Bind("Admin_Pwd") %>'></asp:TextBox><br /> 56
<asp:LinkButton ID="InsertButton" runat="server" CausesValidation="True" CommandName="Insert" 57
Text="插入"></asp:LinkButton> 58
<asp:LinkButton ID="InsertCancelButton" runat="server" CausesValidation="False" CommandName="Cancel" 59
Text="取消"></asp:LinkButton> 60
</InsertItemTemplate> 61
<ItemTemplate> 62
管理员Id: 63
<asp:Label ID="Admin_IdLabel" runat="server" Text='<%# Eval("Admin_Id") %>'></asp:Label><br /> 64
管理员名: 65
<asp:Label ID="Admin_NameLabel" runat="server" Text='<%# Bind("Admin_Name") %>'></asp:Label><br /> 66
管理员密码: 67
<asp:Label ID="Admin_PwdLabel" runat="server" Text='<%# Bind("Admin_Pwd") %>'></asp:Label><br /> 68
<asp:LinkButton ID="EditButton" runat="server" CausesValidation="False" CommandName="Edit" 69
Text="编辑"></asp:LinkButton> 70
<asp:LinkButton ID="DeleteButton" runat="server" CausesValidation="False" CommandName="Delete" 71
Text="删除"></asp:LinkButton> 72
<asp:LinkButton ID="NewButton" runat="server" CausesValidation="False" CommandName="New" 73
Text="新建"></asp:LinkButton> 74
</ItemTemplate> 75
<HeaderTemplate> 76
修改信息 77
</HeaderTemplate> 78
<FooterStyle BackColor="#CCCCCC" ForeColor="Black" /> 79
<EditRowStyle BackColor="#008A8C" Font-Bold="True" ForeColor="White" /> 80
<RowStyle BackColor="#EEEEEE" ForeColor="Black" /> 81
<PagerStyle BackColor="#999999" ForeColor="Black" HorizontalAlign="Center" /> 82
<HeaderStyle BackColor="#000084" Font-Bold="True" ForeColor="White" /> 83
</asp:FormView> 84
</form> 85
</body> 86
</html> 87




