Google Calendar integration with Asp.net using iFrame

It’s very easy to integrate Google Calendar to asp.net

After a long research I have find the solution for Iframe problem with google Calender API.When you directly use the following code in ASP.Net

<iframe src=”http://www.google.com/calendar/”” width=”2000″ height=”2000″></iframe>

It will not render the Google page it shows empty page the reason for this is, that Google is sending an “X-Frame-Options: SAMEORIGIN” response header. This option prevents the browser from displaying iFrames that are not hosted on the same domain as the parent page.

See: Mozilla Developer Network – The X-Frame-Options response header google page will not allow you to render the website in IFrame they enabled X-Frame.

 Solution

      Please follow the steps to create a iFrame inside the google calendar application
  • Go to the google calander then expand my calander from left tab.                                                                                                      
  • Then click on the calendar name and  go to the calendar settings page.                                                 
  • Then copy the iFrame link from embed this calander and use it in your Asp.Net application,here u can customize your google calendar by clicking Customize the color, size, and other.                                                                                                                 
  • My sample project output :                                                                                                                                                                                                                                                   

Deixe uma resposta

O seu endereço de e-mail não será publicado. Campos obrigatórios são marcados com *