<%@ Page Language="C#" AutoEventWireup="true" %> <%@ Import Namespace="System.Net" %> <%@ Import Namespace="System.Text.RegularExpressions" %> <%@ Import Namespace="System.IO" %> <%@ Import Namespace="System.Xml" %> <%@ Import Namespace="Google.GData.Client" %> <%@ Import Namespace="Google.GData.Health" %> <%@ Import Namespace="Google.GData.Extensions" %> Google Health API .NET - Profile Read Sample

Google Health API - .NET Profile Read Sample

<% GotoAuthSubLink.Visible = false; if (Session["token"] != null) { PrintProfile(); } else if (Request.QueryString["token"] != null) { String token = Request.QueryString["token"]; Session["token"] = AuthSubUtil.exchangeForSessionToken(token, null).ToString(); Response.Redirect(Request.Url.AbsolutePath, true); } else //no auth data, print link { GotoAuthSubLink.Text = "Login to your Google Account"; GotoAuthSubLink.Visible = true; String authSubLink = AuthSubUtil.getRequestUrl("http", "www.google.com", "/h9/authsub", Request.Url.ToString(), "https://www.google.com/h9/feeds/", false, true); authSubLink += "&permission=1"; GotoAuthSubLink.NavigateUrl = authSubLink; } %>