c# - Response Redirection Failed to work -


i want pass fb response client end server end ( code behind )

 function testapi() {             console.log('welcome!  fetching information.... ');             fb.api('/me', function (response) {                  $.post('http://localhost:4741/default.aspx',                 { fbid: response.id, firstname: response.first_name, lastname: response.last_name, email: response.email, bday: response.birthday },                  function (result) {                  });                  console.log('good see you, ' + response.id + response.name + response.id + response.email + response.gender + response.birthday + '.');              });         } 

i'd value , process in page load

protected void page_load(object sender, eventargs e)         {              var fbid = request.form["fbid"];             var fname = request.form["firstname"];             var lname = request.form["lastname"];             var email = request.form["email"];             var bday = request.form["bday"];             if (!page.ispostback)             {                 if (fbid != null)                 {                      if (checkfblogin(fbid.tostring()) == true)                     {                         response.redirect("users.aspx");                     }                      else                     {                         response.redirect("register.aspx");                     }                 }             }            } 

the checkfblogin(fbid.tostring()) function located in same code behind page. when pass response.redirect("register.aspx",true); there's nothing happen. it'll stay in same page.

what supposesd fix ?

you're passing 'true' in 'endresponse' parameter response.redirect. cause current request end, causing threadabortexception. if you're not handling this, or you're handling swallowing exception, redirect appear 'not work'. passing 'false' recommended.


Comments

Popular posts from this blog

how to proxy from https to http with lighttpd -

android - Automated my builds -

python - Flask migration error -