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 <[EMAIL PROTECTED]> 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.
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Calendar Data API" group.
To post to this group, send email to 
[email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-calendar-help-dataapi?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to