Quantcast
Channel: ASP.NET AJAX + Ajax Control Toolkit (ACT)
Viewing all articles
Browse latest Browse all 5678

update panel not work after call the function loginByFacebook()

$
0
0

I has a form to do the registration validation. 

After added update panel my validation is not work anymore.

May i know how to create var prm = Sys.WebForms.PageRequestManager.getInstance(); after added this the button not work anymore

here is the full code link

 /*   $(document).ready(function () {
            loginByFacebook();
        });


       function loginByFacebook() {

            var prm = Sys.WebForms.PageRequestManager.getInstance();
            if (prm != null) {
                prm.add_endRequest(function (sender, e) {

                    if (sender._postBackSettings.panelsToUpdate != null) {

                        loginByFacebook();


                    }

                });
            };
        }
        */
<div class="container padding-bottom-5x mb-2"><asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional"><ContentTemplate><div class="col-xl-6 col-md-6 col-sm-6"><asp:Button ID="btnFabebook" runat="server" Text="Facebook Login" OnClientClick="loginByFacebook();"/></div><asp:TextBox ID="txtemailLogin" runat="server" CssClass="form-control" placeholder="Email"></asp:TextBox><span class="input-group-addon"><i class="icon-mail"></i></span><asp:TextBox ID="txtPasswordLogin" runat="server" CssClass="form-control" placeholder="Password" TextMode="Password"></asp:TextBox><span class="input-group-addon"><i class="icon-lock"></i></span>
        protected void Page_Load(object sender, EventArgs e)
        {

            if (string.IsNullOrEmpty(Request.QueryString["access_token"])) return; //ERROR! No token returned from Facebook!!
            //let's send an http-request to facebook using the token            
            string json = GetFacebookUserJSON(Request.QueryString["access_token"]);
            //and Deserialize the JSON response
            JavaScriptSerializer js = new JavaScriptSerializer();
            // dtoFacebookDetail fb = new dtoFacebookDetail();
            Response.Write("dfgdfgdfg");
            if (json != null)
                fbDto = js.Deserialize<dtoFacebookUser>(json);
                if (fbDto != null)
            {
                int res = 1; //= login.FacebookLogin(fbDto);

                if (res == 0)
                {
                    cookieFacebookGenerate();
                }
                else
                {
                    val.resultValidation.Add(m.msgReturn("userLogin", "msgFacebookLoginFail"));
                    val.GetValidationResult(BulletedListSummary);
                    Response.Write("546456");
                }
                Response.Write("dfgdfgdf456456g");
            }


        }


Viewing all articles
Browse latest Browse all 5678

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>