Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Updates not taking

Status
Not open for further replies.

ralphtrent

Programmer
Joined
Jun 2, 2003
Messages
958
Location
US
I have a page that I have loading like this:
Code:
private void Page_Load(object sender, System.EventArgs e)
{
	ci = new CustomerInquiry();
	if (!Page.IsPostBack)
	{
		DataTable dtCustomers = ci.ListCustomers().Tables[0];
		ddlCustomerList.DataSource = dtCustomers;
		ddlCustomerList.DataTextField = "CUST_FULL_NAME";
		ddlCustomerList.DataValueField = "CUST_ID";
		ddlCustomerList.DataBind();
	}
	LoadCustomerInformation(Convert.ToInt32(ddlCustomerList.SelectedValue));
}

I have a form with text boxes and label that get populated during the LoadCustomerInformation routine.

I have a button that should save changes being made to this data. The button code looks like this:

Code:
protected void UpdateCustomer(object sender, System.EventArgs e)
{
	CustomerUpdate cu = new CustomerUpdate();
	try
	{
		cu.UpdateCustomerFromINET(
		Convert.ToInt32(ddlCustomerList.SelectedValue),
		Convert.ToInt32(txtLIVE_LIVES.Text),
		Convert.ToInt32(txtCUST_ONYX_ID.Text),
		Convert.ToInt32(txtSUPPORT_HOUR_START.Text),
		Convert.ToInt32(txtSUPPORT_HOUR_END.Text),
		Convert.ToChar(ddlCUST_TYPE.SelectedValue),
		Convert.ToChar(ddlCUST_DBMS.SelectedValue),
		txtCUST_DBMS_VER.Text,
		Convert.ToInt32(txtFA_CUR_TEST_MAJ_RELEASE.Text),
		txtFA_CUR_TEST_MIN_RELEASE.Text,
		txtFA_CUR_TEST_CHANGE_RELEASE.Text,
		Convert.ToInt32(txtFA_CUR_PROD_MAJ_RELEASE.Text),
		txtFA_CUR_PROD_MIN_RELEASE.Text,
		txtFA_CUR_PROD_CHANGE_RELEASE.Text,
		Convert.ToInt32(txtHG_CUR_TEST_MAJ_RELEASE.Text),
		txtHG_CUR_TEST_MIN_RELEASE.Text,
		txtHG_CUR_TEST_CHANGE_RELEASE.Text,
		Convert.ToInt32(txtHG_CUR_PROD_MAJ_RELEASE.Text),
		txtHG_CUR_PROD_MIN_RELEASE.Text,
		txtHG_CUR_PROD_CHANGE_RELEASE.Text,
		Convert.ToBoolean(chkACTIVE_STS.Checked),
		Convert.ToString(Session["UserName"]));
	}
	catch(Exception ex)
	{
		Response.Write(ex.Message);
	}
}

For some reason, it is not taking my updates. I think it has something to do with my Page_Load code but I can not figure it out. Any clues?

Thanks
 
i found that the page was refreshing before the update code was being invoked.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top