温馨提示:代码在线浏览功能只能做为源码浏览参考,如果想更进一步了解该代码请下载:明博静态新闻文章发布系统源码
当前文件:
MinbelNews/Admin/FileManage.aspx,打开代码结构图
MinbelNews/Admin/FileManage.aspx,打开代码结构图1<%@ Page Language="C#" AutoEventWireup="true" CodeFile="FileManage.aspx.cs" Inherits="Admin_FileManage" %> 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
<link rel="stylesheet" type="text/css" href="../Minbel.com_Css/BaseStyle.css" /> 9
10
</head> 11
<body> 12
<form id="form1" runat="server"> 13
<div> 14
<asp:GridView ID="gvFile" showfooter="True" runat="server" AllowPaging="True" AutoGenerateColumns="False" 15
DataKeyNames="FileID" DataSourceID="FileSDS" PageSize="30" Width="100%"> 16
<Columns> 17
<asp:BoundField DataField="FileID" HeaderText="ID" InsertVisible="False" ReadOnly="True" 18
SortExpression="FileID" > 19
<ItemStyle Width="2%" /> 20
</asp:BoundField> 21
<asp:TemplateField HeaderText="Type" SortExpression="TypeID"> 22
<EditItemTemplate> 23
<asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("TypeID") %>'></asp:TextBox> 24
</EditItemTemplate> 25
<ItemStyle Width="3%" /> 26
<ItemTemplate> 27
<asp:Label ID="Label1" runat="server" Text='<%# Bind("TypeID") %>'></asp:Label> 28
</ItemTemplate> 29
<footertemplate> 30
<asp:textbox id="txtTypeID" runat="server" Width="10px" CssClass="InputCss"></asp:textbox> 31
</footertemplate> 32
</asp:TemplateField> 33
<asp:TemplateField HeaderText="标题" SortExpression="Title"> 34
<EditItemTemplate> 35
<asp:TextBox ID="TextBox2" runat="server" Text='<%# Bind("Title") %>'></asp:TextBox> 36
</EditItemTemplate> 37
<ItemStyle Width="20%" /> 38
<ItemTemplate> 39
<asp:Label ID="Label2" runat="server" Text='<%# Bind("Title") %>'></asp:Label> 40
</ItemTemplate> 41
<footertemplate> 42
<asp:textbox id="txtTitle" runat="server" Width="120px" CssClass="InputCss"></asp:textbox> 43
</footertemplate> 44
</asp:TemplateField> 45
<asp:TemplateField HeaderText="来源" SortExpression="Author"> 46
<EditItemTemplate> 47
<asp:TextBox ID="TextBox3" runat="server" Text='<%# Bind("Author") %>'></asp:TextBox> 48
</EditItemTemplate> 49
<ItemStyle Width="10%" /> 50
<ItemTemplate> 51
<asp:Label ID="Label3" runat="server" Text='<%# Bind("Author") %>'></asp:Label> 52
</ItemTemplate> 53
<footertemplate> 54
<asp:textbox id="txtAuthor" runat="server" Width="50px" CssClass="InputCss"></asp:textbox> 55
</footertemplate> 56
</asp:TemplateField> 57
<asp:TemplateField HeaderText="Url" SortExpression="Url"> 58
<EditItemTemplate> 59
<asp:TextBox ID="TextBox4" runat="server" Text='<%# Bind("Url") %>'></asp:TextBox> 60
</EditItemTemplate> 61
<ItemStyle Width="20%" /> 62
<ItemTemplate> 63
<asp:Label ID="Label4" runat="server" Text='<%# Bind("Url") %>'></asp:Label> 64
</ItemTemplate> 65
<footertemplate> 66
<asp:textbox id="txtUrl" runat="server" Width="150px" CssClass="InputCss"></asp:textbox> 67
</footertemplate> 68
</asp:TemplateField> 69
<asp:TemplateField HeaderText="级别" SortExpression="Limit"> 70
<EditItemTemplate> 71
<asp:TextBox ID="TextBox5" runat="server" Text='<%# Bind("Limit") %>'></asp:TextBox> 72
</EditItemTemplate> 73
<ItemStyle Width="3%" /> 74
<ItemTemplate> 75
<asp:Label ID="Label5" runat="server" Text='<%# Bind("Limit") %>'></asp:Label> 76
</ItemTemplate> 77
<footertemplate> 78
<asp:textbox id="txtLimit" runat="server" Width="10px" CssClass="InputCss"></asp:textbox> 79
</footertemplate> 80
</asp:TemplateField> 81
<asp:TemplateField HeaderText="关键字" SortExpression="KeyWords"> 82
<EditItemTemplate> 83
<asp:TextBox ID="TextBox6" runat="server" Text='<%# Bind("KeyWords") %>'></asp:TextBox> 84
</EditItemTemplate> 85
<ItemStyle Width="10%" /> 86
<ItemTemplate> 87
<asp:Label ID="Label6" runat="server" Text='<%# Bind("KeyWords") %>'></asp:Label> 88
</ItemTemplate> 89
<footertemplate> 90
<asp:textbox id="txKeyWords" runat="server" Width="70px" CssClass="InputCss"></asp:textbox> 91
</footertemplate> 92
</asp:TemplateField> 93
<asp:TemplateField HeaderText="编辑" SortExpression="Editor"> 94
<EditItemTemplate> 95
<asp:TextBox ID="TextBox7" runat="server" Text='<%# Bind("Editor") %>'></asp:TextBox> 96
</EditItemTemplate> 97
<ItemStyle Width="10%" /> 98
<ItemTemplate> 99
<asp:Label ID="Label7" runat="server" Text='<%# Bind("Editor") %>'></asp:Label> 100
</ItemTemplate> 101
<footertemplate> 102
<asp:textbox id="txtEditor" runat="server" Width="50px" CssClass="InputCss"></asp:textbox> 103
</footertemplate> 104
</asp:TemplateField> 105
<asp:TemplateField HeaderText="InputTime" SortExpression="InputTime"> 106
<EditItemTemplate> 107
<asp:TextBox ID="TextBox8" runat="server" Text='<%# Bind("InputTime") %>'></asp:TextBox> 108
</EditItemTemplate> 109
<ItemStyle Width="8%" /> 110
<ItemTemplate> 111
<asp:Label ID="Label8" runat="server" Text='<%# Bind("InputTime") %>'></asp:Label> 112
</ItemTemplate> 113
<footertemplate> 114
<asp:textbox id="txtInputTime" runat="server" Width="70px" CssClass="InputCss"></asp:textbox> 115
<asp:Button ID="btnAdd" Runat="server" CssClass="InputCss" Text="增加" OnClick="btnAdd_Click" /> 116
</footertemplate> 117
</asp:TemplateField> 118
<asp:CommandField ShowDeleteButton="True" ShowEditButton="True" HeaderText="操作" /> 119
</Columns> 120
</asp:GridView> 121
<asp:AccessDataSource ID="FileSDS" runat="server" ConflictDetection="CompareAllValues" 122
DataFile="~/App_Data/minbel.mdb" 123
DeleteCommand="DELETE FROM [FileList] WHERE [FileID] = @original_FileID" 124
InsertCommand="INSERT INTO [FileList] ([TypeID], [Title], [Author], [Url], [Limit], [KeyWords], [Editor], [InputTime]) VALUES (@TypeID, @Title, @Author,@Url, @Limit, @KeyWords,@Editor,@InputTime)" 125
OldValuesParameterFormatString="original_{0}" 126
SelectCommand="SELECT [FileID], [TypeID], [Title], [Author], [Url], [Limit], [KeyWords], [Editor], [InputTime] FROM [FileList] ORDER BY [InputTime] DESC" 127
UpdateCommand="UPDATE [FileList] SET [TypeID] = @TypeID, [Title] = @Title, [Author] = @Author, [Url] = @Url, [Limit] =@Limit, [KeyWords] = @KeyWords, [Editor] = @Editor, [InputTime] =@InputTime WHERE [FileID] = @original_FileID "> 128
<DeleteParameters> 129
<asp:Parameter Name="original_FileID" Type="Int32" /> 130
</DeleteParameters> 131
<UpdateParameters> 132
<asp:Parameter Name="TypeID" Type="Int32" /> 133
<asp:Parameter Name="Title" Type="String" /> 134
<asp:Parameter Name="Author" Type="String" /> 135
<asp:Parameter Name="Url" Type="String" /> 136
<asp:Parameter Name="Limit" Type="String" /> 137
<asp:Parameter Name="KeyWords" Type="String" /> 138
<asp:Parameter Name="Editor" Type="String" /> 139
<asp:Parameter Name="InputTime" Type="DateTime" /> 140
<asp:Parameter Name="original_FileID" Type="Int32" /> 141
142
</UpdateParameters> 143
<InsertParameters> 144
<asp:Parameter Name="TypeID" Type="Int32" /> 145
<asp:Parameter Name="Title" Type="String" /> 146
<asp:Parameter Name="Author" Type="String" /> 147
<asp:Parameter Name="Url" Type="String" /> 148
<asp:Parameter Name="Limit" Type="String" /> 149
<asp:Parameter Name="KeyWords" Type="String" /> 150
<asp:Parameter Name="Editor" Type="String" /> 151
<asp:Parameter Name="InputTime" Type="DateTime" /> 152
</InsertParameters> 153
</asp:AccessDataSource> 154
155
</div> 156
</form> 157
</body> 158
</html> 159



