protected void btn_Click(object sender, EventArgs e) { //We need to get user's selected provider enumerator. PROVIDER_TYPE selectedProvider = (PROVIDER_TYPE)Enum.Parse(typeof(PROVIDER_TYPE), ((Button)sender).Text.ToUpper()); //Initialize User SocialAuthUser objUser = new SocialAuthUser(selectedProvider); //Call Login objUser.Login(returnUrl: "ManualLogin.aspx"); //Login method also accepts a parameter for URL to which user should be redirected after login. If not specified, //automatically defaultUrl as set in Web.Config will be picked for redirection. }