温馨提示:代码在线浏览功能只能做为源码浏览参考,如果想更进一步了解该代码请下载:Asp.net在线投票系统(51aspx版)源码
当前文件:
OnlineVote/ItemManage.aspx[3K,2009-6-12 11:51:27],打开代码结构图
OnlineVote/ItemManage.aspx[3K,2009-6-12 11:51:27],打开代码结构图1<%@ Page Language="C#" AutoEventWireup="true" CodeFile="ItemManage.aspx.cs" Inherits="ItemManage" %> 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="ASPNET2.0BaseCss.css" /> 9
</head> 10
<body> 11
<form id="form1" runat="server"> 12
<table cellpadding="2" cellspacing="0" border="0" width="100%"> 13
<tr> 14
<td><font class="HeaderText">投票项目的选择项管理</font></td> 15
</tr> 16
<tr> 17
<td><hr style="font-size: 1pt;" /></td> 18
</tr> 19
<tr> 20
<td> 21
<asp:DropDownList ID="TopicList" runat="server" Width="300px" OnSelectedIndexChanged="TopicList_SelectedIndexChanged" AutoPostBack="True"> 22
</asp:DropDownList>请选择所属投票主题。</td> 23
</tr> 24
<tr> 25
<td> 26
<asp:DropDownList ID="SubjectList" runat="server" Width="300px" OnSelectedIndexChanged="SubjectList_SelectedIndexChanged" AutoPostBack="True"> 27
</asp:DropDownList>请选择所属投票项目。</td> 28
</tr> 29
<tr> 30
<td> 31
<asp:GridView ID="ItemView" Width="100%" runat="server" AutoGenerateColumns="False" 32
CellPadding="4" OnRowCommand="ItemView_RowCommand" OnRowDataBound="ItemView_RowDataBound" OnRowDeleting="ItemView_RowDeleting" ForeColor="#333333" GridLines="Both"> 33
<FooterStyle ForeColor="White" BackColor="#990000" Font-Bold="True"></FooterStyle> 34
<SelectedRowStyle Font-Bold="True" ForeColor="Navy" BackColor="#FFCC66" BorderColor="CornflowerBlue" /> 35
<RowStyle ForeColor="#333333" BackColor="#FFFBD6" BorderColor="CornflowerBlue" BorderStyle="Solid" BorderWidth="1px" /> 36
<HeaderStyle Font-Bold="True" ForeColor="#FFFFCC" CssClass="GbText" BackColor="#3B6BD1"></HeaderStyle> 37
<Columns> 38
<asp:TemplateField HeaderText="项目名称"> 39
<ItemTemplate> 40
<%#DataBinder.Eval(Container.DataItem,"Name") %> 41
</ItemTemplate> 42
<ItemStyle HorizontalAlign="Left" /> 43
<HeaderStyle Width="60%" /> 44
</asp:TemplateField> 45
<asp:TemplateField HeaderText="当前票数"> 46
<ItemTemplate> 47
<%# DataBinder.Eval(Container.DataItem,"VoteCount") %> 48
</ItemTemplate> 49
<ItemStyle HorizontalAlign="Center" /> 50
<HeaderStyle Width="20%" /> 51
</asp:TemplateField> 52
<asp:TemplateField HeaderText="用户操作"> 53
<ItemTemplate> 54
<a href='UpdateItem.aspx?ItemID=<%#DataBinder.Eval(Container.DataItem,"ItemID") %>'>编辑</a> 55
<asp:ImageButton ID="DeleteBtn" runat="server" CommandName="delete" ImageUrl="~/Images/delete.gif" AlternateText="删除该用户" CommandArgument='<%# DataBinder.Eval(Container.DataItem,"ItemID") %>' /> 56
</ItemTemplate> 57
<ItemStyle HorizontalAlign="Center" /> 58
<HeaderStyle Width="20%" /> 59
</asp:TemplateField> 60
</Columns> 61
<AlternatingRowStyle BorderColor="CornflowerBlue" BackColor="White" BorderStyle="Solid" BorderWidth="1px" /> 62
<PagerStyle BackColor="#FFCC66" ForeColor="#333333" HorizontalAlign="Center" /> 63
<EditRowStyle BorderColor="CornflowerBlue" BorderWidth="1px" /> 64
</asp:GridView> 65
</td> 66
</tr> 67
<tr> 68
<td><asp:Button ID="AddBtn" runat="server" Text="添加新的选择项" Width="160" CssClass="ButtonCss" OnClick="AddBtn_Click" /></td> 69
</tr> 70
<tr> 71
<td></td> 72
</tr> 73
</table> 74
</form> 75
</body> 76
</html> 77




