我用 VS.net 2003 开发:using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using System.Data.OleDb;
namespace _3pz
{
/// <summary>
/// vote 的摘要说明。
/// </summary>
public class vote : System.Web.UI.Page
{
protected System.Web.UI.WebControls.Label show;

private void Page_Load(object sender, System.EventArgs e)
{
if(Request.Form["vote"] == null)
{
show.Text = "您没有选择任何项!";
}
else
{
string ipadress = Request.UserHostAddress;
string id = Request.Form["vote"];
string strCon = "Provider=Microsoft.Jet.OleDb.4.0;Data Source="+Server.MapPath("votedata.mdb");
string sqlSelectIP = "Select ip From ip where id=1";
OleDbConnection conn = new OleDbConnection(strCon);
OleDbCommand cmdSelectIP = new OleDbCommand(sqlSelectIP,conn);
conn.Open();
string oldIP = cmdSelectIP.ExecuteScalar().ToString();
if (ipadress!=oldIP)
{
string sqlUpdateIP = "Update ip Set ip='"+ipadress+"' where id=1";
OleDbCommand cmdUpdateIP = new OleDbCommand(sqlUpdateIP,conn);
cmdUpdateIP.ExecuteNonQuery();
string sqlUpdate = "Update vote Set counts=counts+1 where id="+id;
OleDbCommand cmdUpdate = new OleDbCommand(sqlUpdate,conn);
cmdUpdate.ExecuteNonQuery();
show.Text = "投票成功,谢谢!";
conn.Close();
Response.Redirect("../vote.aspx");
}
else
{
conn.Close();
show.Text = "您刚才已经投过票了!";
}
}
// 在此处放置用户代码以初始化页面
} #region Web 窗体设计器生成的代码
override protected void OnInit(EventArgs e)
{
//
// CODEGEN: 该调用是 ASP.NET Web 窗体设计器所必需的。
//
InitializeComponent();
base.OnInit(e);
}

/// <summary>
/// 设计器支持所需的方法 - 不要使用代码编辑器修改
/// 此方法的内容。
/// </summary>
private void InitializeComponent()
{    
this.Load += new System.EventHandler(this.Page_Load); }
#endregion
}
}
在本机测试正常啊,可是一传到服务器里不出问题了!!http://www.3pz.com/vote/vote.aspx就是不能提交投标,显示正常!