Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8572507
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T19:01:40+00:00 2026-06-11T19:01:40+00:00

how to pass the value in below script to the server side // listen

  • 0

how to pass the value in below script to the server side

// listen for and handle auth.statusChange events
FB.Event.subscribe('auth.statusChange', function(response) {
if (response.authResponse) {
FB.api('/me', function(me) {
document.getElementById('auth-displayname').innerHTML = me.name;
document.getElementById('Email').innerHTML = me.email;
document.getElementById('gender').innerHTML = me.gender;
document.getElementById('birth').innerHTML = me.birthday;
document.getElementById('firstname').innerHTML = me.first_name;
})
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T19:01:41+00:00Added an answer on June 11, 2026 at 7:01 pm

    In webform2.aspx

         <script type="text/javascript">
            function LoadValues(me) {
                         {
    
                            var Email = me.email;
                            var Name = me.name;
                            var Id = me.id;
                            var Dob = me.birthday;
                            var Gender = me.gender;
                            alert(Email)
    
                            document.getElementById('auth-loggedout').style.display = 'none';
                            document.getElementById('auth-loggedin').style.display = 'block';
    
    
                              var data2Send = '{"fbemail": '+Email+', "fbname":'+Name+', "fbid":'+Id+',"fbname":'+Dob+',"fbname":'+Name+' }';
            $.ajax({
                type: "POST",
                url: 'webform2.aspx/Testmethod',
                data: data2Send,
                contentType: "application/json; charset=utf-8",
                dataType: "json",
                success: function (arg) {console.log(arg) //call successfull
                $("#lbltxt").text(arg);
                },
                error: function (xhr) {
                  alert(xhr);  //error occurred
                }
            });
    
    
              }
    </script>
    

    In webform2.aspx.cs

    [System.Web.Services.WebMethod]
        public static string TestMethod(string fbid, string fbemail, string fbsex, string fbdob)
        {
    
    
            SqlConnection con = new SqlConnection();
            SqlCommand cmd = new SqlCommand();
            SqlDataReader datareader;
    
    
            con = new SqlConnection(".......");
            cmd = new SqlCommand("SpFacebookInfo", con);
            con.Open();
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.AddWithValue("@FbId", fbid);
            cmd.Parameters.AddWithValue("@FbEmail", fbemail);
            cmd.Parameters.AddWithValue("@FbSex", fbsex);
            cmd.Parameters.AddWithValue("@FbDob", fbdob);
            datareader = cmd.ExecuteReader();
            datareader.Close();
    
            return fbemail;
    
    
        }
    
                }      
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this snippet of code below. I want to pass the value of
R has pass-by-value semantics, which minimizes accidental side effects (a good thing). However, when
Can I pass a value out of a javascript function and back to the
I am doing below to pass Json data to My MVC controller action Script
below is a java script function and the html for the clicked item that
<script type=text/javascript> var CountryVal; var StateVal; $(document).ready(function(){ $('#ItemCountry').change(function(){ CountryVal = this.value; // value of
<script type=text/javascript> var CountryVal; var StateVal; $(document).ready(function(){ $('#ItemCountry').change(function(){ CountryVal = this.value; // value of
I am trying to access my function in a dll and pass by value
I'm trying to pass value by using EL expression in get request parameter, but
Can I pass value to Navigation Context like this: NavigationContext.QueryString[param1] = PARAM1; Is it

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.