title: how to alert string is palindrome or not using webmethod when click on submit button
body: <pre class="lang-cs prettyprint-override"><code>[code page="c#"]  
  
  [WebMethod]
      public static string check(string st)
      {
          String reverse = "";
  
  
  
  
          for (int i =  st.Length; - 1; i &gt;= 0; i--)
          {
              reverse += st[i];
          }
  
  
          return reverse;
      }
  </code></pre>
  
  <p>I having dropdown from where when I select any option then depending upon that option when I give input into textbox and click on submit button than that value passed into webmethod using json.stringfy and showing the alert.but how to alert string is palindrome or not using webmethod when click on submit button?</p>