Here is the sample code:
public void load()
{
string sqlStatement = "SELECT EmpName FROM Employee WHERE
EmpID=@EmployeeID ORDER BT EmpName DESC" ;
SqlCommand comm = new SqlCommand();
comm.CommandText = sqlStatement;
int empID = int.Parse(Request.QueryString["EmployeeID"]);
SqlConnection connection = Ideal_DataAccess.getConnection();
comm.Connection = connection;
comm.Parameters.AddWithValue("@EmployeeID", empID);
try
{
connection.Open();
comm.ExecuteNonQuery();
txtBxName.Text= string.Format("<%# Bind(\"{0}\") %>", "EmpName");
}
catch (Exception ex)
{
throw ex;
}
finally
{
connection.Close();
}
}