Click here to Skip to main content
15,501,036 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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",
"DTSTART:" + schBeginDate.ToUniversalTime().ToString("yyyyMMdd\\THHmmss\\Z"), 
"DTEND:" + schEndDate.ToUniversalTime().ToString("yyyyMMdd\\THHmmss\\Z"), 
"LOCATION:" + strLocation, 
"SUMMARY:" + "SKS TASK: "+A.task_title, 
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.
Updated 4-Oct-16 5:10am

1 solution

Share this answer
Rajesh waran 5-Oct-16 3:09am    
Thank you for the reply. Let me try.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900