Posts

Showing posts from February, 2015

select all checkbox in table using jquery

Image
< html > < head > < script type ="text/javascript" src ="Jquery.1.10.2.js"></ script >    < script type ="text/javascript">        $(document).ready( function () {            $( '#selectall' ).click( function (event) {                if ( this .checked) {                    $( '.chkval' ).each( function () {                        this .checked = true ;                    });                }                else {                    $( '.chkval' ).each( function () {                        this .checked = false ;                    });                }            });        }); </ script > </ head > < body > < table id ="tblhd" border ="1" style =" width :100%;">                                         < tr >               < td >< input type ="checkbox&

Clear Browser Cache using Asp.net c#

A  web cache  is a Process for the temporary storage of  web documents , such as  HTML pages  and  images , to reduce  bandwidth  usage,  server  load. Use this function all the Button Click Event Automatically Clear the cache memory.      public void RemoveCache()         {             HttpContext context = HttpContext .Current;             IDictionaryEnumerator enumerator = context.Cache.GetEnumerator();             while (enumerator.MoveNext())             {                 context.Cache.Remove(enumerator.Key.ToString());             }         }

Print Html Table in Asp.net Jquery

< html > < head > < script src ="Jquery.1.10.2.js" type ="text/javascript"></ script > < script type ="text/javascript">     function btnPrint_onclick() {         $( '#tblcat td:nth-child(2), th:nth-child(2)' ).remove();         $( '#tblcat_length' ).hide();         $( '#tblcat_filter' ).hide();         $( '#tblcat_info' ).hide();         $( '#tblcat_first' ).hide();         $( '#tblcat_previous' ).hide();         $( '#tblcat_next' ).hide();         $( '#tblcat_last' ).hide();         var docprint = window.open( "about:blank" , "_blank" );         var oTable = document.getElementById( "tblcat" );         docprint.document.open();         docprint.document.write( '<html><head><title>Master</title>' );         docprint.document.write( '</head><

how to assign asp.net dropdownlist id and text in jquery using ajax service?

Jquery < script type ="text/javascript">     $(document).ready( function () {         getCat();     });     function getCat() {         $.ajax({             type: "POST" ,             url: "Pro.aspx/Select" ,             dataType: "json" ,             data: {},             contentType: "application/json; charset=utf-8" ,             success: function (data) {                 var jsdata = JSON.parse(data.d);                 $.each(jsdata, function (key, value) {                     $( '#DDLCat' ).append($ ( "<option</option>" ).val(value.id_fk).html(value.Cat));                 });             },             error: function (data) {                 alert( "Problom on Loading...." );             }         });     } </ script > ASPX Code < asp : DropDownList ID ="DDLCat" class ="input-xlar