日期:2014-05-18 浏览次数:21013 次
public partial class bd : System.Web.UI.Page { public string aa; public string idd; public string ksmc; public string brxm; public string jtdh; public string ygbh; public string ygxm; public string times; public void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { if (Request["idd"] != null)//判断是否有接受值,如果有 { idd = Request["idd"].ToString(); } if (Request["ksmc"] != null)//判断是否有接受值,如果有 { ksmc = Request["ksmc"].ToString(); } if (Request["brxm"] != null)//判断是否有接受值,如果有 { brxm = Request["brxm"].ToString(); } if (Request["jtdh"] != null)//判断是否有接受值,如果有 { jtdh = Request["jtdh"].ToString(); } if (Request["ygbh"] != null)//判断是否有接受值,如果有 { ygbh = Request["ygbh"].ToString(); } if (Request["ygxm"] != null)//判断是否有接受值,如果有 { ygxm = Request["ygxm"].ToString(); } if (idd == "1") { DropDownList1.Visible = true; DropDownList2.Visible = false; Image9.Visible = true; Image2.Visible = false; aa = DropDownList1.DataValueField; } if (idd == "0") { DropDownList2.Visible = true; DropDownList1.Visible = false; Image2.Visible = true; Image9.Visible = false; aa = DropDownList2.DataValueField; } txtbt1.Text = ksmc; txtbt2.Text = ygxm; txtbt3.Text = ygbh; txtbt4.Text = brxm; txtbt5.Text = jtdh; txtbt6.Text = DateTime.Now.ToString(); } } protected void btnSubmit_Click(object sender, EventArgs e) { OleDbConnection conn = new OleDbConnection(); conn.ConnectionString = "Provider = Microsoft.Jet.OleDb.4.0;" + "Data Source =" + Server.MapPath("App_Data/#db1.mdb"); string strVal = "'" + txtbt1.Text + "','" + txtbt2.Text + "','" + txt