投票系统分享(3)
来源:未知 责任编辑:责任编辑 发表时间:2015-03-01 01:47 点击:次
72 }
73 if (pass == "pass")
74 {
75 Response.Write("<script language='javascript'>alert('你每天只能投票一次');history.back();</script>");
76 Response.End();
77 }
78 else
79 {
80 SqlConnection conn = new SqlConnection();
81 conn.ConnectionString = " Data Source=.;database=VoteDB;integrated security=true; ";
82 conn.Open();
83 SqlCommand cmd=new SqlCommand ();
84 cmd.Connection = conn;
85 cmd.CommandType = CommandType.Text;
86 bool Mode = Convert.ToBoolean(HiddenField1.Value);
87 if (Mode)
88 {
89 CheckBoxList rb = (CheckBoxList)Panel1.FindControl("listVoteItem");
90 if (rb.SelectedIndex == -1)
91 {
92 Response.Write("<script language='javascript'>alert('你必须至少选择一项');history.back();</script>");
93 Response .End ();
94 }
95 else
96 {
97 foreach(ListItem item in rb.Items )
相关新闻>>
最新推荐更多>>>
- 发表评论
-
- 最新评论 更多>>