Last post Mar 13, 2008 10:28 AM by K-FEY
Feb 13, 2008 11:16 AM|slimbunny|LINK
I am looking to build a ASP.NET VB Data-Driven Calendar Tool using the Calendar Tool.
Here is a basic requirement, when the user click on a calendar date the events/activities for that day will appear in a table on the same page. Events/Activities will be retrieved from a SQL 2005 database. How do I connect the Calendar Control to an sql
2005 database. Please give me some pointers to connecting the calendar control data with database table.
thanks you much......
Feb 13, 2008 02:31 PM|taylorsooner|LINK
If I am understanding your requirements correctly, you won't need to connect the calendar to the database. What you can do is whenever the user clicks on a date in the calendar, retrieve that date, and pass it as a parameter to a query (or stored procedure)
in your database. Then use the dataset returned from your database as the datasource for a gridview or other databound control to display the events on the page.
Hope this helps.
Feb 13, 2008 05:26 PM|slimbunny|LINK
[Yes] thank you.
Mar 13, 2008 10:28 AM|K-FEY|LINK
You also can use de pre render event of the calender to display info related to particular dates in the calender as so: I use the e.date value to check if that particular date contains info and a while loop to get all relevant info for that day and display
it in this case i use an acces Database but u can une a MSSql or others as so
strSql = strSql &
myCommand.CommandType = CommandType.Text
e.Cell.VerticalAlign = VerticalAlign.Top
e.Cell.HorizontalAlign = HorizontalAlign.Left
lbl.Text = lbl.Text &