Posts

Showing posts from February, 2016

ASP.NET Show Google Calander events on website

Image
Use following code and embed google calendar URI in Iframe

<br />
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><br />
<br />
<html xmlns="http://www.w3.org/1999/xhtml"><br />
<head runat="server"><br />
    <title></title><br />
</head><br />
<body><br />
    <form id="form1" runat="server"><br />
    <div style="height: 100%"><br />
    <iframe src="https://calendar.google.com/calendar/embed?height=600&amp;wkst=1&amp;bgcolor=%23FFFFFF&amp;src=psfk10mvkc62kkrpd944vjc6v8%40group.calendar.google.com&amp;color=%232F6309&amp;src=s75kjovancegd4r6v6srd9jg7o%40group.calendar.google.com&amp;color=%23853104&amp;src=n1r42b0bavaouisgchidtf6iic%40group.calendar.google.com&amp;color=%23182C57&amp;src=q0g03n0u…

ASP.Net Draw Google like Calendar to add/delete/show events

Image
Function call in code behind:

  lblCal.Text = DrawCalender(Session("month"), Session("year"), shrink)



Function Module to Draw Calander:
(dayevent function will connect to your database to get events as datatable and render it into calander dates.
  myquery = "select   project , concat(coord, ' Venue-', venue, ' ') as coord, start_dt,day(start_dt) as day, project as highlight, concat(' on ', date_format(start_dt,'%d.%m.%y')) as description, if(start_dt=end_dt, project ,concat(project,'(',convert(day(start_dt),char(2)),'-', convert(day(end_dt),char(2)),')')) as trim , 'PRT/PDRM' as type, '' as file, uid from diaryPRT where month(prtmonth) = " & Session("month") & " and year(prtmonth) = " & Session("year")
 ViewState("mydata") = dbOperation.getCalenderData(myquery)
)

Function DrawCalender(ByVal month AsInteger, ByVal year AsInteger, Optiona…

Google+ Followers