title: Ajax calling WebMethod
body: <p>I have created Accrodions dynamically and inside each pane is a link button. I have assigned a value to the ID of the link button. what I want to accomplish is that when I click on a link button in one of my pane I want to use the ID' value as the parameter.</p>
  
  <p>My Ajax:</p>
  
  <pre><code>function FireThisEvent() {
      var Value;
  
          $("lnkCopy").click(function(event) {Value = (event.target.id);})
          alert(Value);
          alert(lnkCopy.val());
          $.ajax({
              type: "POST",
              url: "frmSchemeSetup.aspx/sbGetData",
              data: '{sdPreNo: Value}',
              type: "POST",
              contentType: "application/json; charset=utf-8",
              dataType: "JSON",
              timeout: 10000,
              success: function() {
                  alert("YEAH!!!");
              },
              error: function(xhr, status) {
                  alert(status + " - " + xhr.responseText);
              }
          });
  
      }
  </code></pre>
  
  <p>How can I accomplish this?</p>
  
  <p>This is where I add the event to my link button</p>
  
  <pre><code>lnkCopy.Attributes.Add("onclick", "FireThisEvent()")
  </code></pre>