Advertisement
Guest User

Untitled

a guest
Feb 11th, 2013
141
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  <script>
  2.         $(document).ready(function () {
  3.             $("#SelectCountry").load()
  4.             {
  5.                 $.ajax({
  6.                     url: "../Member/Home.aspx/GetCountryName",
  7.                     type: "POST",
  8.                     dataType: 'json',
  9.                     contentType: 'application/json; charset=utf-8',
  10.                     data: "{'name': '" + "1" + "'}",
  11.                     async: false,
  12.                     success: function (response) {
  13.                         if (response.d != null) {
  14.                             $.each(response.d, function (i, response) {
  15.                                 debugger;
  16.                                 $("#SelectCountry").append("<option value=" + response.CountryId + ">" + response.CountryName + "</option>");
  17.                             });
  18.                         }
  19.                     },
  20.                     error: function (xhr) {
  21.                     }
  22.                 });
  23.             }
  24.         });
  25.     </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement