When I click the save button I get two errors the first is "To display the web page again the web browser needs to resend the inforformation you perviously submitted. If you were making a purchase you should click cancel to avoid duplicate transactions.
Here is the code:
to avoid first issue, in addNewProfile function, replace window.location.reload() with this
window.location.href = window.location.href;
about second issue... it means, the code cannot step into called function... because the function being called is present in some of the dll or from .net framework whose function code is not present in the solution and it cannot step through
hope this helps...
Cheers!
KK
Please mark as Answer if post helps in resolving your issue
My Site
Marked as answer by bthumber on Oct 11, 2012 03:20 PM
bthumber
Member
244 Points
669 Posts
Error while saving data to database
Oct 10, 2012 07:46 PM|LINK
When I click the save button I get two errors the first is "To display the web page again the web browser needs to resend the inforformation you perviously submitted. If you were making a purchase you should click cancel to avoid duplicate transactions. Here is the code:
protected void btnOK_Click(object sender, EventArgs e) { try { chkDefault.Checked = false; lblAdmin.Visible = true; lblAdmin.Text = txtProfile.Text; Session["myProfile"] = txtProfile.Text; ScriptManager.RegisterStartupScript(this, this.GetType(), "addProfile", "addNewProfile();", true); } catch (Exception ex) { log.Debug(ex.StackTrace); throw; } }Here is the Javascript:
<script type="text/javascript" language="javascript"> function addNewProfile() { updateSettings(''); window.location.reload(); } </script>and:
function updateSettings(param) { $('#ctl00_ContentPlaceHolder1_errorContainer').html(''); var probability; var chkboxdefault = 0; var exactdob = 0; var exactname = 0; var includejurisdictions = 0; var includenulldob = 0; var includesexoffender = 0; var includesexoffendernulldobs = 0; var excludearrestrecords = 0; var acepopupdecision = 0; var nameOrder; var alternatedob = 0; var altdobmm = 0; var altdobdd = 0; var altdobyy = 0; var filterfactfirstname = 0; var filterfactlastname = 0; var additionaladdresses = 0; var enableadditionalname = 0; var apply7yearlimit = 0; var exclude7yearnodate = 0; var apply7yearlimitsexoffender = 0; var apply7yearlimitsentinel = 0; probability = $('#ctl00_ContentPlaceHolder1_ProbabilityList').val(); nameOrder = $('#ctl00_ContentPlaceHolder1_ddlNameOrder').val(); if ($('#ctl00_ContentPlaceHolder1_ExactDob:checked').val() == 'on') { exactdob = 1; } if ($('#ctl00_ContentPlaceHolder1_chkDefault:checked').val() == 'on') { chkboxdefault = 1; } if ($('#ctl00_ContentPlaceHolder1_ExactName:checked').val() == 'on') { exactname = 1; } if ($('#ctl00_ContentPlaceHolder1_IncludeJurisdictions:checked').val() == 'on') { includejurisdictions = 1; } if ($('#ctl00_ContentPlaceHolder1_IncludeNullDob:checked').val() == 'on') { includenulldob = 1; } //Sex Offender if ($('#ctl00_ContentPlaceHolder1_IncludeSexOffender:checked').val() == 'on') { includesexoffender = 1; } // if ($('#ctl00_ContentPlaceHolder1_IncludeSexOffenderNullDobs:checked').val() == 'on') { includesexoffendernulldobs = 1; } //7Yr Limit if ($('#ctl00_ContentPlaceHolder1_Apply7YearLimit:checked').val() == 'on') { apply7yearlimit = 1; } // if ($('#ctl00_ContentPlaceHolder1_Exclude7YearNoDate:checked').val() == 'on') { exclude7yearnodate = 1; } // if ($('#ctl00_ContentPlaceHolder1_Apply7YearLimitSexOffender:checked').val() == 'on') { apply7yearlimitsexoffender = 1; } // if ($('#ctl00_ContentPlaceHolder1_Apply7YearLimitSentinel:checked').val() == 'on') { apply7yearlimitsentinel = 1; } if ($('#ctl00_ContentPlaceHolder1_ExcludeArrestRecords:checked').val() == 'on') { excludearrestrecords = 1; } if ($('#ctl00_ContentPlaceHolder1_AltDOB:checked').val() == 'on') { alternatedob = 1; } altdobmm = $('#ctl00_ContentPlaceHolder1_ddlMonth').val(); altdobdd = $('#ctl00_ContentPlaceHolder1_ddlDay').val(); altdobyy = $('#ctl00_ContentPlaceHolder1_ddlYear').val(); acepopupdecision = $('#ctl00_ContentPlaceHolder1_ddlACEPopupDecision').val(); if ($('#ctl00_ContentPlaceHolder1_FilterFirstName:checked').val() == 'on') { filterfactfirstname = 1; } if ($('#ctl00_ContentPlaceHolder1_FilterLastName:checked').val() == 'on') { filterfactlastname = 1; } additionaladdresses = $('#ctl00_ContentPlaceHolder1_ddlEvictionAddresses').val(); if ($('#ctl00_ContentPlaceHolder1_EnableAdditionalName:checked').val() == 'on') { enableadditionalname = 1; } $.post('../Admin/UpdateSearchSettings.aspx', { probability: probability, exactdob: exactdob, exactname: exactname, includejurisdictions: includejurisdictions, includenulldob: includenulldob, includesexoffender: includesexoffender, includesexoffendernulldobs: includesexoffendernulldobs, excludearrestrecords: excludearrestrecords, acepopupdecision: acepopupdecision, nameOrder: nameOrder, alternatedob: alternatedob, altdobmm: altdobmm, altdobdd: altdobdd, altdobyy: altdobyy, filterfactfirstname: filterfactfirstname, filterfactlastname: filterfactlastname, additionaladdresses: additionaladdresses, enableadditionalname: enableadditionalname, chkboxdefault: chkboxdefault, enableadditionalname: enableadditionalname, apply7yearlimit: apply7yearlimit, exclude7yearnodate: exclude7yearnodate, apply7yearlimitsexoffender: apply7yearlimitsexoffender, apply7yearlimitsentinel: apply7yearlimitsentinel }, function(ret) { if (ret != '') { $('#ctl00_ContentPlaceHolder1_errorContainer').html(ret); } else { if (String(param).substr(0,6) == 'altdob') { param = 'mmddyy' } NameOrder(); $('#' + param + 'Update').show().fadeOut(1500); } }); window.location.href = window.location.href; }Also, what is Disassembly code? How can I fix that.
kedarrkulkar...
All-Star
35559 Points
5698 Posts
Re: Error while saving data to database
Oct 10, 2012 08:03 PM|LINK
to avoid first issue, in addNewProfile function, replace window.location.reload() with this
window.location.href = window.location.href;
about second issue... it means, the code cannot step into called function... because the function being called is present in some of the dll or from .net framework whose function code is not present in the solution and it cannot step through
hope this helps...
KK
Please mark as Answer if post helps in resolving your issue
My Site
bthumber
Member
244 Points
669 Posts
Re: Error while saving data to database
Oct 10, 2012 08:39 PM|LINK
But how do you fix it.