用的是C#,請大家幫幫忙
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.Text.RegularExpressions;
using System.Data.SqlClient;
namespace Fileupload
{
/// <summary>
/// Addhistory ªººK­n´y­z¡C
/// </summary>
public class Addhistory : System.Web.UI.Page
{
protected System.Web.UI.WebControls.Button Button1;
protected System.Web.UI.WebControls.TextBox TextBox1;
protected System.Web.UI.WebControls.TextBox TextBox2;
protected System.Web.UI.WebControls.Label Label1;
private void Page_Load(object sender, System.EventArgs e)
{
Label1.Text=this.Request.QueryString[ "filename "];
}
#region Web Form ³]­p¤u¨ã²£¥Íªºµ{¦¡½X
override protected void OnInit(EventArgs e)
{
//
// CODEGEN: ¦¹¬° ASP.NET Web Form ³]­p¤u¨ã©Ò»Ýªº©I¥s¡C
//
InitializeComponent();
base.OnInit(e);
}
/// <summary>
/// ¦¹¬°³]­p¤u¨ã¤ä´©©Ò¥²¶·ªº¤èªk - ½Ð¤Å¨Ï¥Îµ{¦¡½X½s¿è¾¹­×§ï
/// ³o­Ó¤èªkªº¤º®e¡C
/// </summary>
private void InitializeComponent()
{
this.Button1.Click += new System.EventHandler(this.Button1_Click);
this.Load += new System.EventHandler(this.Page_Load);
}
#endregion
private void savehistory()
{
string sModel=TextBox1.Text.ToUpper();
string sERP_NO=TextBox2.Text.ToUpper();
SqlConnection conn = new SqlConnection( "data source=(local);user id=sa;password=chrdw;database=test ");
SqlCommand cmd = new SqlCommand( "insert into VGA(Model,ERP_NO) VALUES( ' "+sModel+ " ', ' "+sERP_NO+ " ') ",conn);