投票系统分享(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 )
相关新闻>>
最新推荐更多>>>
- 发表评论
-
- 最新评论 进入详细评论页>>
今日头条
更多>>您可能感兴趣的文章
- 使用ASP.NET MVC3+EF+Jquery制作文字直播系统(四
- .net架构的最后思考(箴言)
- MVC3+Entity Framework 实现投票系统(二)
- .NET简谈互操作(四:基础知识之Dispose非托管内存
- asp.net DataTable和Dataset序列化成Json格式
- .NET设计模式:工厂方法模式(Factory Method)[1]
- Web Service学习笔记(4)
- Spring MVC 3.0.5+Spring 3.0.5+MyBatis3.0.4全注
- JQuery+Asp.net MVC实现用户名重名查询
- 聊聊.net程序设计——浅谈使用VS2010建模拓展(下



