如何实现自动提交网上投票的功能,像下面的例子,如果想为自己公司多投票,如何实现?见下面的例子. 在这个http://06www100.ciweekly.com.week5.com/index.php网站上,如果想为我们公司投一票,即在我们公司上的checkbox上打一个勾后,然后录入下面的验证码,提交即可投上一票.不知是否能实现? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 haodouzhe123x(涉足CSDN) 呵呵,帮你投一票!!!-----------------------------难道你知道楼主是哪家公司的 <table width="100%" border="0" cellspacing="0" cellpadding="0" align="center"><center>調查:這個客訴系統有作用嗎<br><ASP:DataGrid id="MyList2" showheader=false AllowPaging="True" AllowSorting="true" PageSize="50" ShowFooter="false" PagerStyle-Visible="false" runat="server" Width="100%" GridLines="None" CellPadding="0" CellSpacing="1" bgcolor="#CCCCFF" HeaderStyle-BackColor="#CCCCFF" HeaderStyle-ForeColor="#CCCCFF" AlternatingItemStyle-BackColor="#ffffff" itemstyle-backcolor="#ffffff" Font-Name="宋体" Font-Size="8pt" EnableViewState="false" AutoGenerateColumns="false" DataKeyField="ballot_id"> <Columns><asp:TemplateColumn ItemStyle-Width="55%" HeaderText="主題"> <ItemTemplate><table><tr><td width="100%"><%# DataBinder.Eval(Container.DataItem,"ballot_name").ToString()%><input type="radio" name="ballot" value="<%# DataBinder.Eval(Container.DataItem,"ballot_name").ToString()%>" checked="true"><img src="images/bar.jpg" width="<%# DataBinder.Eval(Container.DataItem,"ballot_num").ToString()%>" height="10"><%# DataBinder.Eval(Container.DataItem,"ballot_num").ToString()%>票<br><%# SubStr(((Convert.ToInt16(DataBinder.Eval(Container.DataItem,"ballot_num"))/Convert.ToDouble(Session["sum1"]))*100).ToString()) %>%<%# SubStr(DataBinder.Eval(Container.DataItem,"sum2").ToString()) %>%</td></tr></table></ItemTemplate> </asp:TemplateColumn><asp:BoundColumn ItemStyle-Width="12%" HeaderText="發言時間" DataField="sum2" DataFormatString="{0:0.0}%"/></Columns> </asp:DataGrid> <tr><td bgcolor=ffffff align=center><input type="button" id="Button1" value="投票" OnServerClick="Button1_Click" runat="server"> <input type='reset' class='button' value='結果' onClick="openwin()"/> 總數:<asp:Label id="label1" runat="server"/>票</td></tr></table>------------------------- public void Button1_Click(Object Source, EventArgs e) { string nowDSN=ConfigurationSettings.AppSettings["appeal"]; SqlConnection myConnection=new SqlConnection(nowDSN); string CommandText; SqlCommand myCommand = new SqlCommand(); myCommand.Connection=myConnection; myCommand.Connection.Open(); myCommand.CommandText = "update ballot set ballot_num=ballot_num+1 where ballot_name='"+Request.Form["ballot"].ToString()+"'"; myCommand.ExecuteNonQuery(); myCommand.Connection.Close(); Response.Write ("<script>window.alert('已成功投票,按“确定”返回');location.href='left.aspx';</script>"); } 如果动态的执行下面的SQL 存储的问题啊 ?? 请问高手,存储带参数该怎么用啊? 加一条记录时如何让一个字段的值自动初始化成另一个自增字段? 一个想了两个星期都未解决的问题!!! 初学者,求句简单的SQL语句. =======一个难写的sql语句,欢迎各位高手来测试一下功力!:)======= 如何实现数据库的远程备份!急急急! 请求帮助>>>>>>>>> SQL 列拼接行展示 这个like条件怎么写? 关于SQL-Server登陆用户都改了无法注册连接
-----------------------------
难道你知道楼主是哪家公司的
<center>
調查:這個客訴系統有作用嗎<br>
<ASP:DataGrid id="MyList2"
showheader=false
AllowPaging="True"
AllowSorting="true"
PageSize="50"
ShowFooter="false"
PagerStyle-Visible="false"
runat="server"
Width="100%"
GridLines="None"
CellPadding="0"
CellSpacing="1"
bgcolor="#CCCCFF"
HeaderStyle-BackColor="#CCCCFF"
HeaderStyle-ForeColor="#CCCCFF"
AlternatingItemStyle-BackColor="#ffffff"
itemstyle-backcolor="#ffffff"
Font-Name="宋体"
Font-Size="8pt"
EnableViewState="false"
AutoGenerateColumns="false"
DataKeyField="ballot_id">
<Columns>
<asp:TemplateColumn ItemStyle-Width="55%" HeaderText="主題">
<ItemTemplate>
<table>
<tr><td width="100%">
<%# DataBinder.Eval(Container.DataItem,"ballot_name").ToString()%>
<input type="radio" name="ballot" value="<%# DataBinder.Eval(Container.DataItem,"ballot_name").ToString()%>" checked="true">
<img src="images/bar.jpg" width="<%# DataBinder.Eval(Container.DataItem,"ballot_num").ToString()%>" height="10">
<%# DataBinder.Eval(Container.DataItem,"ballot_num").ToString()%>票<br>
<%# SubStr(((Convert.ToInt16(DataBinder.Eval(Container.DataItem,"ballot_num"))/Convert.ToDouble(Session["sum1"]))*100).ToString()) %>%
<%# SubStr(DataBinder.Eval(Container.DataItem,"sum2").ToString()) %>%
</td>
</tr>
</table>
</ItemTemplate>
</asp:TemplateColumn><asp:BoundColumn ItemStyle-Width="12%" HeaderText="發言時間" DataField="sum2" DataFormatString="{0:0.0}%"/></Columns>
</asp:DataGrid>
<tr><td bgcolor=ffffff align=center>
<input type="button" id="Button1" value="投票" OnServerClick="Button1_Click" runat="server"> <input type='reset' class='button' value='結果' onClick="openwin()"/> 總數:<asp:Label id="label1" runat="server"/>票</td></tr>
</table>-------------------------
public void Button1_Click(Object Source, EventArgs e)
{
string nowDSN=ConfigurationSettings.AppSettings["appeal"];
SqlConnection myConnection=new SqlConnection(nowDSN);
string CommandText;
SqlCommand myCommand = new SqlCommand();
myCommand.Connection=myConnection;
myCommand.Connection.Open();
myCommand.CommandText = "update ballot set ballot_num=ballot_num+1 where ballot_name='"+Request.Form["ballot"].ToString()+"'";
myCommand.ExecuteNonQuery();
myCommand.Connection.Close();
Response.Write ("<script>window.alert('已成功投票,按“确定”返回');location.href='left.aspx';</script>");
}