4 messages in com.googlegroups.google-calendar-help-dataapiRe: Add Time to Event Using Extension...
FromSent OnAttachments
manoj07 May 2008 22:10 
Frank Mantek08 May 2008 01:37 
manoj08 May 2008 02:24 
Frank Mantek08 May 2008 03:01 
Subject:Re: Add Time to Event Using Extension Element to Atom Entry
From:manoj (mano@gmail.com)
Date:05/08/2008 02:24:16 AM
List:com.googlegroups.google-calendar-help-dataapi

First question: why are you not using the Calendar classes?

I want to create web application which shold allow multiple users to Login from same machine. This is not achieved by Authentication Methods provided by CalendarFeed So I am using AtomFeed Authentication method which serves my purpose.

Second question: what do you mean with "ExtensionElements.Add" is not working?

AtomEntry contains ExtensionElements array which has values for When & Where Fields. It is where I want to add Time & Location for event.But it is not getting added. Instead event gets created with default server time & blank Event Location.

On May 8, 1:37 pm, "Frank Mantek" <fman@gmail.com> wrote:

First question: why are you not using the Calendar classes? Second question: what do you mean with "ExtensionElements.Add" is not working?

Frank Mantek Google

On Thu, May 8, 2008 at 7:10 AM, manoj <mano@gmail.com> wrote:

Hi,

I am using AtomEntry to add New Event to Calendar using .Net API I am able to create event, but not able to set Event Start Time & Event End Time in ExtensionElements of AtomEntry. The event is created with same default start & end time. Please look through code snippet for your reference. Thank you.

CreateEvent() { AtomEntry oAtomEntry = new AtomEntry(); oAtomEntry.Title.Text="some title"; oAtomEntry.Content.Content ="some content";

XmlDocument oXD = new XmlDocument(); XmlNode oXmlNode = oXD.CreateNode(XmlNodeType.Attribute, "startTime",http://schemas.google.com/g/2005"); oXmlNode.Value = startTime XmlElement oxml =oXD.CreateElement(GDataParserNameTable.XmlWhenElement); oxml.Attributes.SetNamedItem(oXmlNode); XmlNode oXmlNodeEnd = oXD.CreateNode(XmlNodeType.Attribute,"endTime","http:// schemas.google.com/g/2005"); oXmlNodeEnd.Value = o EventTime.EndTime.ToLongTimeString(); oxml.Attributes.SetNamedItem(oXmlNodeEnd); oAtomEntry.ExtensionElements.Add(oxml); //But this statement doesn't add ExtensionElement to AtomEntry }

Similarly, I am not able to inset Where as it is also an Extension Element that need to be added to AtomEntry.