Skip to main content

Posts

Showing posts from October, 2019

file upload not working in updatepanel asp.net

The Fileupload Control is not working in the UpdatePanel in asp.net. To use the FileUpload control in the Updatepanel. We need to add the Post back trigger to the UpdatePanel Like the below Code < asp : UpdatePanel ID = "UpnlFileUpload" runat = "server" > < ContentTemplate > < asp : FileUpload ID = "FlUpload" runat = "server" /> < asp : Button ID = "btnFileUpload" runat = "server" Text = "Upload" OnClick = "btnFileUpload_OnClick" /> </ ContentTemplate > < Triggers > < asp : PostBackTrigger ControlID = "btnFileUpload" /> </ Triggers > </ asp : UpdatePanel > Here we need to pass the Button Control ID in the PostBackTrigger Like the above code. Generally after adding the PostBackTrigger it works accurate but some time it will not work. In this case you need to add the below code in the  Page_Lo...

DataTable.js, Change the Color of Row based on the Cell Value

DataTable.js, Change the Color of Row based on the Cell Value Suppose you wants to change the color of Table Row on the bases of column value, then we have to use  rowCallback as the below code rowCallback: function (row, data, index) {             if (data[3] ==="some value") {                 $(row).css('color', 'red');             }                     } This code should be used like the below: var table = $('#TableName').DataTable( {         'paging': true,         'lengthChange': true,         'searching': true,         'ordering': true,         'info': true,         'autoWidth': false,         'ajax': 'JsonData.json',         'columnDefs': [{  ...