Showing posts from February, 2016

ASP.NET Show Google Calander events on website

Use following code and embed google calendar URI in Iframe

<br />
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" ""><br />
<br />
<html xmlns=""><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=";wkst=1&amp;bgcolor=%23FFFFFF&amp;;color=%232F6309&amp;;color=%23853104&amp;;color=%23182C57&amp;src=q0g03n0u…

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

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…