Note that there are some explanatory texts on larger screens.

plurals
  1. POCould not see updated value while debugging ASP.NET Web Application
    primarykey
    data
    text
    <p>I have used same command button Click event for both Insert, Update functionalities.</p> <p>I'm checking with the url-querystring to achieve this functioality. If the url-querystring is null then the page is meant for insert. If the url-querystring is NOT null then the page is meant for update.</p> <p>The code is shown below, but the update functionality is not working. When I debug the page, I understood that the new updated value is not presenting in the debug window. I have modified CR_TITLE and debugged. The new value is not coming in the debug. What is the problem?</p> <pre><code> protected void btnInsert_Click(object sender, EventArgs e) { try { ChangeRequest changeRequest = new ChangeRequest(); changeRequest.CR_REF_NO = txtCRRefNumber.Text.Trim(); changeRequest.CR_TITLE = txtCRTitle.Text.Trim(); changeRequest.ORIGIN1_ID = Convert.ToInt32(ddlOrigin1.SelectedValue); if (Request["ecr"] == null) { (new ChangeRequestBLL()).InsertECR(changeRequest); ((BLMSite)this.Master).ErrorText = string.Empty; ((BLMSite)this.Master).MessageText = "Record inserted successfully"; } else if (Request["ecr"] != null) { (new ChangeRequestBLL()).UpdateECR(ecrRefNo, changeRequest); ((BLMSite)this.Master).ErrorText = string.Empty; ((BLMSite)this.Master).MessageText = "Record updated successfully"; } } catch (Exception ex) { ((BLMSite)this.Master).ErrorText = ex.Message; ((BLMSite)this.Master).MessageText = string.Empty; } } </code></pre> <p>Edit: I need to put this code inside (!Page.IsPostBack) condition. This is where I have committed mistake. Adding of this statement solved my problem.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload