Button Submit calls Onload first!
<p>I have a problem with a webform. </p>

<p><strong>My Goal:</strong> Intially when a page is loading, it has to load every textbox empty. After filling the info and click submit, it has to get submitted(UpdatePaymentInfo())</p>

<p><strong>Problem:</strong> Here, When the user fills the info and clicks Submit,it calls onload function even before the submit button and makes all text box empty.</p>

<p>Here is the code:</p>

<pre><code>protected override void OnLoad(EventArgs e)
{
    base.OnLoad(e);

    string QueryStringupdatecreditcard1 = Request.QueryString.ToString();

    if (String.Equals(QueryStringupdatecreditcard1, "tabID=B"))
    {
        divTitle.Visible = false;
        trmain.Visible = false;
        tdOrderSummary.Visible = false;
        trCCandBilling.Visible = true;
        trtest2.Visible = false;
        divUpdatecreditcard.Visible = true;
        trusecompaddress.Visible = false;

        txtFirstName.Text = "";
        txtLastName.Text = "";
        txtAddress1.Text = "";
        txtAddress2.Text = "";
        txtCity.Text = "";
        txtZip.Text = "";
        txtCardNo.Text = "";
        txtVccNumber.Text = "";
        trAmountCharged.Visible = false;
    }
}

protected void imgbtnSubmit_Click(object sender, ImageClickEventArgs e)
{
    try
    {
        UpdatePaymentInfo();
    }
}
</code></pre>
