温馨提示:代码在线浏览功能只能做为源码浏览参考,不能展示项目的全部,如果想更进一步了解该代码请下载:Asp.net投票系统[单/复选,投票数量/项随意]源码
当前文件路径:ComplexVote/WebForm2.aspx.cs

1using System; 2
using System.Collections; 3
using System.ComponentModel; 4
using System.Data; 5
using System.Drawing; 6
using System.Web; 7
using System.Web.SessionState; 8
using System.Web.UI; 9
using System.Web.UI.WebControls; 10
using System.Web.UI.HtmlControls; 11
12
namespace vote 13
{ 14
/// <summary> 15
/// WebForm2 的摘要说明。 16
/// </summary> 17
public partial class WebForm2 : System.Web.UI.Page 18
{ 19
20
protected void Page_Load(object sender, System.EventArgs e) 21
{ 22
// 在此处放置用户代码以初始化页面 23
} 24
25
Web 窗体设计器生成的代码 44
45
protected void Button1_Click(object sender, System.EventArgs e) 46
{ 47
string[] a=new string[3]; 48
a[0]="hahah"; 49
a[1]="xixi"; 50
a[2]="heihei"; 51
Application.Add("a",a); 52
} 53
54
protected void Button2_Click(object sender, System.EventArgs e) 55
{ 56
string[] b=(string[])Application["a"]; 57
for(int i=0;i<b.Length;i++) 58
{ 59
this.ListBox1.Items.Add(b[i]); 60
} 61
} 62
63
protected void Button3_Click(object sender, System.EventArgs e) 64
{ 65
this.Label1.Text="<h1>标题</h1>"; 66
} 67
68
protected void Button4_Click(object sender, System.EventArgs e) 69
{ 70
this.Label1.Text=Server.HtmlEncode("<h1>标题</h1>"); 71
} 72
73
} 74
} 75





}