Posts

Showing posts from January, 2020

Data not retaining in the text box coming from database on JQuery button click in asp.net Application

Most of the time what happen is we are able to write back end code to fetch data for text box to get auto filled on button click but it does not appear on front end or toggle for seconds in text box . Solution to remove this problem is to give type to button as type="button" which is very necessary.  function getReportData() {                 $.ajax({                     "url": "ReportTable.aspx/GetReport",                     "contentType": "application/json; charset=utf-8",                     "type": "POST",                     "dataType": "JSON",                     "success": function (data) {                         data = JSON.parse(data.d);                         $.each(data, function (key, val) {                             var tr = '<tr>';                             tr += '<td>' + (key + 1) + '</td>';