将活动添加到谷歌日历和雅虎日历

发布于 2024-11-05 21:59:44 字数 47 浏览 3 评论 0原文

如何在 ASP.NET 中将事件添加到 google 日历和 yahoo 日历?

How can I add an event to google calendar and yahoo calendar in asp.net?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

z祗昰~ 2024-11-12 21:59:44

下载 api,查看 api。
http://code.google.com/apis/calendar/data/2.0 /developers_guide_dotnet.html

请注意创建事件的部分
来自:http://code.google.com/apis/calendar /data/2.0/developers_guide_dotnet.html#CreatingSingle

  1. 对服务进行身份验证

  2. 创建事件

EventEntry entry = new EventEntry();

// Set the title and content of the entry.
entry.Title.Text = "Tennis with Beth";
entry.Content.Content = "Meet for a quick lesson.";

// Set a location for the event.
Where eventLocation = new Where();
eventLocation.ValueString = "South Tennis Courts";
entry.Locations.Add(eventLocation);

When eventTime = new When(DateTime.Now, DateTime.Now.AddHours(2));
entry.Times.Add(eventTime);

Uri postUri = new Uri("https://www.google.com/calendar/feeds/default/private/full");

// Send the request and receive the response:
AtomEntry insertedEntry = service.Insert(postUri, entry);

download the api, review the api.
http://code.google.com/apis/calendar/data/2.0/developers_guide_dotnet.html

Note the section for creating events
From: http://code.google.com/apis/calendar/data/2.0/developers_guide_dotnet.html#CreatingSingle

  1. Authenticate to the service

  2. Create the event

EventEntry entry = new EventEntry();

// Set the title and content of the entry.
entry.Title.Text = "Tennis with Beth";
entry.Content.Content = "Meet for a quick lesson.";

// Set a location for the event.
Where eventLocation = new Where();
eventLocation.ValueString = "South Tennis Courts";
entry.Locations.Add(eventLocation);

When eventTime = new When(DateTime.Now, DateTime.Now.AddHours(2));
entry.Times.Add(eventTime);

Uri postUri = new Uri("https://www.google.com/calendar/feeds/default/private/full");

// Send the request and receive the response:
AtomEntry insertedEntry = service.Insert(postUri, entry);
清引 2024-11-12 21:59:44
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文