VB Calendar - Populate with mysql events table
I have a table with dates in mysql that I want to populate a vb calendar with as events, or "active" days.
Using a sql statement with something like
Select event, date FROM dateTable WHERE event = eventType.SelectedValue
how do I put these as events on my calender
<asp:Calendar runat="server" id="calendar1"></asp:calendar>
开发者_如何学Python
I'm sure I use data:repeater in some way I just can't figure it out.
Here's MSDN's article on Displaying Selected Dates From a Database in the Calendar Control.
The modifications you'd need are:
- swapping out the SQL Server (
System.Data.SqlClient
)code with the MySQL Connector for .NET (or your favorite MySQL library for .NET). - suggested improvements might be scrapping the DataSet, and go with a local MySqlDataReader instead
精彩评论