DatatList sqlsource RRS feed


  • User61956409 posted

    Hi becky,

    Welcome to ASP.NET forum.

    any idea which i could retrieve data from mysql and be viewed on the calendar? 

    You could use MySQLConnector to connect to and access MySQL database like this.

    string constr = ConfigurationManager.ConnectionStrings["constr"].ConnectionString;
    using (MySqlConnection con = new MySqlConnection(constr))
        using (MySqlCommand cmd = new MySqlCommand("SELECT * FROM YourTable"))
            using (MySqlDataAdapter sda = new MySqlDataAdapter())
                cmd.Connection = con;
                sda.SelectCommand = cmd;
                using (DataTable dt = new DataTable())
                    //bind your DatatList with "dt"

    For more information, please refer to this article.


    Best Regards,

    Fei Han

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, July 8, 2015 2:09 AM