Call .Cs method on .Aspx Page

Call  .Cs method on .Aspx Page

Step 1: Method on  .Cs page

   public string GetFileName()
        {
            return "kandy";
        }

Step 2: Calling from .aspx Page

    <script>

        $(document).ready(function () {
          
            var Filename = '<%= GetFileName() %>';
            debugger;
            alert(Filename);
        });

    </script>

Comments

Popular posts from this blog

Create and save QR code in asp.net with C#

Change text of RadGrid Header Dynamically

Telerik Radwindow Open on Button Click