views:

11

answers:

0

This is the particular webservice code where i retrieve the username ,how i can i write c# code to place json data to sql database in webservice and display the acknowledgement in html page

public class AjaxService : System.Web.Services.WebService
{
    [WebMethod]
    public bool CheckUserNameAvailability(string userName)
    {
        List<String> userNames = new List<string>() { "azamsharp", "johndoe", "marykate", "alexlowe", "scottgu" };

        var user = (from u in userNames
                    where u.ToLower().Equals(userName.ToLower())
                    select u).SingleOrDefault<String>();

        return String.IsNullOrEmpty(user) ? true : false; 

    }

}

}