title: How can I call a non static method written in code behind using javascript?
body: <p>Kindly help me to call a non-static method from code behind, using json object.</p>
  
  <p>The following code is used in aspx page:                                          </p>
  
  <pre><code> function columnDropdownScript() {
                  if (id == "ExpressionsLink") {
                      var dropdown = document.getElementById("&lt;%=ddlTableNames.ClientID%&gt;");
                  }
  
                  /
  
  / Configure AJAX call to server on itemChange of ddlTableNames
                  $.ajax({
                      type: "POST",
                      url: "Webtop.aspx/FillColumnDropdown",
                      data: requestTableParameters,
                      //contentType: "plain/text",
                      contentType: "application/json; charset=utf-8",
                      dataType: "json",
                      success: function(msg) {
                          if (id == "ExpressionsLink") {
                              $("#ddlColumnNames").empty();
  
                              }
                          }
                          //  alert('Check Column DropDown' + msg.d.length);
                      },
                      error: DisplayError //Event that'll be fired on Error
                  });
  
              }                                                                   
  </code></pre>
  
  <p>The following code is written in aspx.cs page                                    </p>
  
  <pre><code>[WebMethod]
      public static List&lt;string&gt; FillColumnDropdown(string selTableName)
      {
  
         //Code to update Selected Columns in table
      }             
  </code></pre>