title: How to access repeater textbox in jquery ajax
body: <p>I'm making a RealTime Comment System in Asp.net Webforms ajax jquery....
  I have a Repeater where i have one TextBox and one Button ... i want simply insertion through ajax jquery but jquery ajax didn't find out TextBox which is declared inside Repeater control...</p>
  
  <p><strong><em>Script:</em></strong></p>
  
  <pre><code>$(document).ready(function () {
          $('#btnComment').click(function () {
  
              $.ajax({
                  type: "POST",
                  url: "index.aspx/insertComment",
                  data: '{comtext: "' +txtComment.value + '"}',
                  contentType: "application/json; charset=utf-8",
                  dataType: "json",
                  success: function (data) {
                      alert("ok");
                      //$('#txtComment').val("");
                  }
              });
          });
      });
  &lt;/script&gt;
  </code></pre>
  
  <p>when i debug the script i the problem with data....txtComment.value...
  but when i try for TextBox outside the Repeater like this:
  data: '{comtext: "' + $("#&lt;%=txtComment.ClientID%>")[0].value + '" }'
  then it works for me but not findout TextBox inside Repeater</p>
  
  <p><strong><em>Code Behind:</em></strong></p>
  
  <pre><code>[WebMethod]
      public static string insertComment(string comtext)
      {
  
          //Button btnComment = sender as Button;
          //RepeaterItem item = btnComment.NamingContainer as RepeaterItem;
          //TextBox txtComment = item.FindControl("txtComment") as TextBox;
          //lblMsg.Text = txtComment.Text;
          SqlConnection con = new SqlConnection("data source=RIO;initial catalog=SocialNetworkSite;integrated security=true");
          SqlCommand cmd = new SqlCommand("insert into Comment (comtext) values ('" + comtext + "')", con);
  
          con.Open();
          cmd.ExecuteNonQuery();
          con.Close();
  
          return comtext;
      }
  </code></pre>
  
  <p>please HELP</p>