Login:  Password:    
forgot my password
sign up!
Search: 
 
  This post is part of:
    Online course(s):   
 Course ASP.NET 4 and Visual Studio 2010

Holidays: Calendar Control - Course ASP.NET 4 and Visual Studio 2010 - Lesson 21 | DevMedia .net courses

In this video we discuss the Calendar control in more detail. Specifically, we are going to retrieve some events (holidays) from the database and render those specific events differently on the calendar.

"

Duration:  21 minutes

Summary: In this video we discuss the Calendar control in more detail. Specifically, we are going to retrieve some events (holidays) from the database and render those specific events differently on the calendar. We start by creating a database TestASPNET that we are going to use in this and upcoming videos. We create one table named Holidays that contains the holidays’ dates and their descriptions. Once we are done with that, we modify the page to read the data from the Holidays table using ADO.NET. We read the data and put it in 2 generic lists (one for the holiday and one for the description). We handle the DayRender event and for every day rendered, we look to see if it matches one of our holidays. If it does, we change the background color of the day, we disable it selection, and make its tooltip the description we retrieved from the database. We will discuss ADO.NET in more details in upcoming videos.

Methodology of the development of example: Good coding standard and simplified design to illustrate the key points.

Technology Used: ASP.NET and Visual Studio 2010

Keyword: ASP.NET 4, Visual Studio 2010, SqlDataReader, SqlCommand, SqlConnection, DayRender, IsSelectable, ToolTip, BackColor, List, dateTime.





Add a comment!
[Fechar]

Este post é fechado - você precisa ter acesso ao post para incluir um comentário.


Andy
2/26/2012 10:43am
Problem creating SQLConnection in asp.net Website Hi,
I was following this Calendar Control Holidays Tutorial and I came across one issue that doesn't let me create a SqlConnection. I added System.Data and System.Data.SqlClient namespaces at the top in using statement. That is happening only when I am creating the asp.net Website. When I started the asp.net Application, it is all working fine.

I know that I am missing some references in Website but when I tried adding references to System.Data and System.Data.SqlClient, it says that System.Data is already being added.  I don't see any references for System.Data.SqlClient in the list of references.

What exactly I will have to do to make the SqlConnection to work on my asp.net website?




Answer it
 
Ayad
2/26/2012 2:24pm
RE:   Hi Andy,
 
Remember, there are two things here:
 
1- Adding the "using" statement at the top. This is only to avoid writing the full name "System.Data.SqlClient...."
But this does not add the reference. This is only to bring the namespace in and save typing.
 
2- Adding the reference: This is when you add the dll by right-clicking on the "references" in the web site and adding the dll you need.
 
Try this first: drop a grid on the page and follow the grid's wizard to add a data source. Then test the page. Is the grid working properly (are you able to display data)? 


Answer it
 



 
Help us to improve! Give us your feedback:
Give your note to the technical content
10 9 8 7 6 5 4 3 2 1
Give your note to the post's learning
10 9 8 7 6 5 4 3 2 1
Is this post helpful?
Yes No


Ayad Boudiab
Experience: A total of 10 years experience in developing applications using C++, Java, C#, ASP.NET, and SQL Server. In addition to 6 years experience in teaching programming courses at a local college. Degree: B.S. Computer Science Location: Atla...


Go to author's Space


Post stats:
Favorited:
 0

Post actions:
[Close]
To have full access to this post (or download the associated files) you must have MrBool Credits.

  See the prices for this post in Mr.Bool Credits System below:

Individually – in this case the price for this post is US$ 2,00 (Buy it now)
in this case you will buy only this video by paying the full price with no discount.

Package of 10 credits - in this case the price for this post is US$ 1,00
This subscription is ideal if you want to download few videos. In this plan you will receive a discount of 50% in each video. Subscribe for this package!

Package of 50 credits – in this case the price for this post is US$ 0,33
This subscription is ideal if you want to download several videos. In this plan you will receive a discount of 83% in each video. Subscribe for this package!


> More info about MrBool Credits








mrbool.com
contact us   |   publish your post   |   buy credits

Copyright 2012 - all rights reserved to www.web-03.net