开发者

VB Calendar - Populate with mysql events table

开发者 https://www.devze.com 2023-04-02 06:43 出处:网络
I have a table with dates in mysql that I want to populate a vb calendar with as events, or \"active\" days.

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
0

精彩评论

暂无评论...
验证码 换一张
取 消