发布时间 : 星期一 文章在线投票系统更新完毕开始阅读
protected void Button1_Click(object sender, EventArgs e) {
if (Session[\ {
ResponseMessage(this.Page, \请您登录!\ return;
}
if (Request.Cookies[\
{
this.msg.InnerHtml=\ } else {
HttpCookie cookie = new HttpCookie(\ cookie.Value = \
cookie.Expires = DateTime.Now.AddMinutes(1); Response.AppendCookie(cookie);
Charmmax.BLL.Vote_Record bll = new Charmmax.BLL.Vote_Record(); Charmmax.Model.Vote_Record Charmmax.Model.Vote_Record();
StringBuilder strlist = new StringBuilder(); foreach (RepeaterItem di in Repeater1.Items) {
Repeater ds = (Repeater)di.FindControl(\
36
model = new
HiddenField qc = (HiddenField)di.FindControl(\ //for (int i = 0; i < ds.Items.Count;i++ ) foreach (RepeaterItem dli in ds.Items) {
// cb = ((CheckBox)ds.FindControl(\ CheckBox cb = dli.FindControl(\ HiddenField hf = (HiddenField)dli.FindControl(\
if (cb.Checked) {
model.Q_Id = Convert.ToInt32(hf.Value); model.I_ID = Convert.ToInt32(qc.Value); model.ComeIP Convert.ToString(Request.UserHostAddress);
model.AddDate = DateTime.Now;
bll.Add(model);
strlist.Append(qc.Value + \ }
} }
RegisterClientScriptBlock(\\ote.aspx','_blank')\ } }
37
=