Here is my code-behind, what am I doing wrong?
Thx
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Data.SqlClient ;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
namespace PartsInventoryRequest
{
/// <summary>
/// Summary description for WebForm1.
/// </summary>
public class WebForm1 : System.Web.UI.Page
{
protected System.Web.UI.WebControls.DropDownList cmbTechList;
protected System.Web.UI.WebControls.Label Label1;
protected System.Web.UI.WebControls.Label Label2;
protected System.Web.UI.WebControls.TextBox txtPartDescription;
protected System.Web.UI.WebControls.Label Label3;
protected System.Web.UI.WebControls.Button btnClear;
protected System.Web.UI.WebControls.Button btnRemove;
protected System.Web.UI.WebControls.Button btnDispatch;
protected System.Web.UI.WebControls.TextBox txtPartID;
protected System.Web.UI.WebControls.Button btnAdd;
private void Page_Load(object sender, System.EventArgs e)
{
}
#region Web Form Designer generated code
override protected void OnInit(EventArgs e)
{
//
//
InitializeComponent();
base.OnInit(e);
}
private void InitializeComponent()
{
this.txtPartID.Attributes.Add ("onBlur", "ValidatePart();");
this.Load += new System.EventHandler(this.Page_Load);
}
#endregion
public void ValidatePart()
{
string PartID = null ;
PartID = this.txtPartID.Text ;
}
}