<asp:Button ID="btnLoginToGoogle" runat="server" OnCommand="OpenLogin_Click" ToolTip="Google_Login" CssClass="ch_google_button" CommandArgument="https://www.google.com/accounts/o8/id" Width="141px" />
protected void OpenLogin_Click(object src, CommandEventArgs e) { try { string discoveryUri = e.CommandArgument.ToString(); var b = new UriBuilder(Request.Url) { Query = "" }; var req = openid.CreateRequest(discoveryUri, b.Uri, b.Uri); var fetchRequest = new FetchRequest(); fetchRequest.Attributes.AddRequired(WellKnownAttributes.Contact.Email); fetchRequest.Attributes.AddRequired(WellKnownAttributes.Name.First); fetchRequest.Attributes.AddRequired(WellKnownAttributes.Name.Last); fetchRequest.Attributes.AddRequired(WellKnownAttributes.Person.Gender); fetchRequest.Attributes.AddRequired(WellKnownAttributes.Contact.Phone.Mobile); fetchRequest.Attributes.AddRequired(WellKnownAttributes.BirthDate.WholeBirthDate); req.AddExtension(fetchRequest); req.RedirectToProvider(); } catch (Exception ex) { } }
((System.Threading.ThreadAbortException)(ex)) {Unable to evaluate expression because the code is optimized or a native frame is on top of the call stack.} ex.Data Unable to evaluate expression because the code is optimized or a native frame is on top of the call stack. ex.HelpLink Unable to evaluate expression because the code is optimized or a native frame is on top of the call stack. ex.HResult Unable to evaluate expression because the code is optimized or a native frame is on top of the call stack. ex.InnerException Unable to evaluate expression because the code is optimized or a native frame is on top of the call stack. ex.Message Unable to evaluate expression because the code is optimized or a native frame is on top of the call stack. ex.Source Unable to evaluate expression because the code is optimized or a native frame is on top of the call stack. ex.StackTrace Unable to evaluate expression because the code is optimized or a native frame is on top of the call stack. ex.TargetSite Unable to evaluate expression because the code is optimized or a native frame is on top of the call stack.
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)