Click here to Skip to main content
15,889,216 members
Home / Discussions / C#
   

C#

 
GeneralRe: I want to show my GPS cursor in Mapwingis, how to do it? Pin
Pete O'Hanlon16-Jun-16 22:37
mvePete O'Hanlon16-Jun-16 22:37 
GeneralRe: I want to show my GPS cursor in Mapwingis, how to do it? Pin
Member 1241411416-Jun-16 22:40
Member 1241411416-Jun-16 22:40 
GeneralRe: I want to show my GPS cursor in Mapwingis, how to do it? Pin
Pete O'Hanlon16-Jun-16 22:45
mvePete O'Hanlon16-Jun-16 22:45 
QuestionHow to find out, if the toolbar icon or the notifyicon is clicked Pin
Member 1191673515-Jun-16 19:26
Member 1191673515-Jun-16 19:26 
AnswerRe: How to find out, if the toolbar icon or the notifyicon is clicked Pin
OriginalGriff15-Jun-16 20:22
mveOriginalGriff15-Jun-16 20:22 
GeneralRe: How to find out, if the toolbar icon or the notifyicon is clicked Pin
Member 1191673515-Jun-16 22:50
Member 1191673515-Jun-16 22:50 
GeneralRe: How to find out, if the toolbar icon or the notifyicon is clicked Pin
OriginalGriff15-Jun-16 22:53
mveOriginalGriff15-Jun-16 22:53 
QuestionAccess Gmail contacts through C # Pin
Member 1253942914-Jun-16 14:42
Member 1253942914-Jun-16 14:42 
Hi,

C#
I need to access my gmail contacts to upgrade an Access database. A program in C # manages this basis. I checked on the Internet and appeared several ways, but none worked. I found a video that the speaker creates the code step by step and in the end he managed to access the gmail contacts.
I typed the code and is giving an error in word in of code:
foreach (Contact contato in f.Entries)


C#
The following code:


C#
using System;
using System.Data;
using Google.Contacts;
using Google.GData.Client;
using Google.GData.Extensions;

namespace ContatosGmail
{
    public partial class Default : System.Web.UI.Page
    {

        protected void btnObter_Click(object sender, EventArgs e)
        {
            DataSet ds = new DataSet();
            ds.Tables.Add("GmailContacts");
            ds.Tables[0].Columns.Add("EmailId");
            RequestSettings rs = new RequestSettings("Taveira", txtUsername.Text, txtPassword.Text);
            rs.AutoPaging = true;
            ContactsRequest cr = new ContactsRequest(rs);
            Feed<Contact> f = cr.GetContacts();
            
            foreach (Contact contato in f.Entries)
            {
                foreach (EMail email in contato.Emails)
                {
                    DataRow row = ds.Tables[0].NewRow();
                    row["EmailId"] = email.Address.ToString();
                    ds.Tables[0].Rows.Add(row);
                }
            }
            GridView1.DataSource = ds.Tables[0];
            GridView1.DataBind();
            lblStatus.Text = "Toal de contatos para " + txtUsername.Text + ": " + ds.Tables[0].Rows.Count.ToString();
        }
    }
}


C#
I am in urgent need of this solution.
Using Visual Studio Professional 15 and Windows 10.
Thank you.

AnswerRe: Access Gmail contacts through C # Pin
BillWoodruff14-Jun-16 16:16
professionalBillWoodruff14-Jun-16 16:16 
AnswerRe: Access Gmail contacts through C # Pin
K Ashok 14-Jun-16 20:01
professionalK Ashok 14-Jun-16 20:01 
AnswerRe: Access Gmail contacts through C # Pin
Pete O'Hanlon14-Jun-16 21:04
mvePete O'Hanlon14-Jun-16 21:04 
GeneralRe: Access Gmail contacts through C # Pin
Member 1253942924-Jun-16 1:52
Member 1253942924-Jun-16 1:52 
NewsIcon c# library Pin
Matthew Hazlett14-Jun-16 10:37
Matthew Hazlett14-Jun-16 10:37 
GeneralWrong forum Pin
Richard Deeming14-Jun-16 11:18
mveRichard Deeming14-Jun-16 11:18 
GeneralRe: Icon c# library Pin
BillWoodruff14-Jun-16 16:06
professionalBillWoodruff14-Jun-16 16:06 
Questionhow to create three moving cars from different directions meeting at the junction Pin
Member 1252666814-Jun-16 5:22
Member 1252666814-Jun-16 5:22 
AnswerRe: how to create three moving cars from different directions meeting at the junction Pin
Simon_Whale14-Jun-16 5:30
Simon_Whale14-Jun-16 5:30 
AnswerRe: how to create three moving cars from different directions meeting at the junction PinPopular
OriginalGriff14-Jun-16 6:19
mveOriginalGriff14-Jun-16 6:19 
GeneralRe: how to create three moving cars from different directions meeting at the junction Pin
Kenneth Haugland14-Jun-16 6:52
mvaKenneth Haugland14-Jun-16 6:52 
GeneralRe: how to create three moving cars from different directions meeting at the junction Pin
OriginalGriff14-Jun-16 8:14
mveOriginalGriff14-Jun-16 8:14 
GeneralRe: how to create three moving cars from different directions meeting at the junction Pin
Kenneth Haugland14-Jun-16 8:30
mvaKenneth Haugland14-Jun-16 8:30 
GeneralRe: how to create three moving cars from different directions meeting at the junction Pin
OriginalGriff14-Jun-16 8:47
mveOriginalGriff14-Jun-16 8:47 
AnswerRe: how to create three moving cars from different directions meeting at the junction Pin
Pete O'Hanlon14-Jun-16 6:23
mvePete O'Hanlon14-Jun-16 6:23 
AnswerRe: how to create three moving cars from different directions meeting at the junction Pin
Matthew Hazlett15-Jun-16 9:58
Matthew Hazlett15-Jun-16 9:58 
QuestionError in listing open windows Pin
srikrishnathanthri13-Jun-16 20:08
srikrishnathanthri13-Jun-16 20:08 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.