投票系统分享(4)

来源:未知 责任编辑:责任编辑 发表时间:2015-03-01 01:47 点击:

 98                     {
 99                         if(item .Selected )
100                         {
101                             cmd.CommandText ="update VoteItem set Number=Number+1 where ItemID="+item.Value.ToString ();
102                             cmd.ExecuteNonQuery ();
103                         }
104                     }
105                     Response .Cookies ["pass"].Value ="pass";
106                     Response .Cookies ["pass"].Expires =DateTime .Now.AddDays (1);
107                     Response .Write ("<script language='javascript'>alert('投票成功');history.back();</script>");
108
109                 }
110
111 
112             }
113             else
114             {
115                 RadioButtonList rb=(RadioButtonList )Panel1 .FindControl ("listVoteItem");
116                 if(rb.SelectedIndex ==-1)
117                 {
118                     Response .Write ("<script language='javascript'>alert('你必须至少选择一票');history.back();</script>");
119                     Response .End ();
发表评论
请自觉遵守互联网相关的政策法规,严禁发布色情、暴力、反动的言论。
用户名: 验证码:点击我更换图片
最新评论 更多>>

推荐热点

  • 浅析.NET下XML数据访问新机制
  • asp.net 面试+笔试题目第1/2页
  • C# 邮件地址是否合法的验证
  • asp.net 设置GridView的选中行的实现代码
  • C#高级编程:数据库连接[1]
  • ASP.NET&#160;GridView列表代码示例
  • 经典C++程序1
  • 微软ASP.NET站点部署指南(3):使用Web.Config文件的Transforma
  • 微软ASP.NET站点部署指南(2):部署SQL Server Compact数据库
网站首页 - 友情链接 - 网站地图 - TAG标签 - RSS订阅 - 内容搜索 - 移动版 - 返回顶部
Copyright © 2008-2013 计算机技术学习交流网. 版权所有

豫ICP备11007008号-1