SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How to call sharepoint webpart usercontrol method in AJAX


                type: "POST",
                url: "FundUserRegister2.asmx\validateEmail",

                data: "{'strMailID': '" + $('#<%= txtEmail.ClientID %>').val() + "'}",

                contentType: "application/json; charset=utf-8",

                dataType: "json",

                success: function (message) {


                }, error: function (message) {


method is as following

        public static string validateEmail(string strMailID)

            if (string.IsNullOrEmpty(strMailID))
                string pwdRandom = DateTime.Now.ToString("htffffsH");

                MembershipCreateStatus status;
                MembershipUser newUser = Membership.CreateUser(strMailID, pwdRandom, strMailID, null, null, false, out status);
                if (status == MembershipCreateStatus.Success)
                    return "true";
                    return "false";
                return "false";
share|improve this question
May I know why you want to get user control in ajax – Mathematics Jan 17 '13 at 20:43
to check dynamically weather user exist in database – raky Jan 17 '13 at 21:46

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.