Hi, Actually i'm creating appointments every day to all users. If i create an appointment it should be able to view by the users in their Google Calendar.
Initially I have started this task by creating ".ics" file and i sent to users mail account.
I have taken the following code to create calendar file with the help of Google.
string strDesc = "The new task has been created: " + A.task_title + "";
string[] contents = { "BEGIN:VCALENDAR",
"PRODID:-//Flo Inc.//FloSoft//EN",
"BEGIN:VEVENT",
"DTSTART:" + schBeginDate.ToUniversalTime().ToString("yyyyMMdd\\THHmmss\\Z"),
"DTEND:" + schEndDate.ToUniversalTime().ToString("yyyyMMdd\\THHmmss\\Z"),
"LOCATION:" + strLocation,
"DESCRIPTION;ENCODING=ESCAPED-CHAR:" + strDesc,
"SUMMARY:" + "SKS TASK: "+A.task_title,
"PRIORITY:3",
"END:VEVENT",
"END:VCALENDAR"
};
System.IO.File.WriteAllLines("E:\\Ongoing Projects\\TimesMed\\Dashboard_TM\\calfile\\"+A.task_title+".ics", contents);
Attachment mailAttachment = new Attachment("E:\\Ongoing Projects\\TimesMed\\Dashboard_TM\\calfile\\" + A.task_title + ".ics");
And i'm sending this ics file to users mail.
Now what's my problem is each and every time i used to send this calendar file to users. And they have to open mail and add this calendar file for every new appointment.
Is there any way to make an appointment by directly sync with google calendar?
I'm still searching in Google for the correct solution.Can you guide me with any Articles or User guide for Calendar?
Hope the Question is easy to understood. And sorry if anything wrong with my language.
Thanks in Advance,
Rajeshwaran T
What I have tried:
I have mentioned the code what i have tried.