Sign up ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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 – Please Teach 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.