/ Published in: C#
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
private Dictionary<string, int> Data { get { { SqlDataReader rdr = null; conn.Open(); string query = ""; using (rdr = cmd.ExecuteReader()) { while (rdr.Read()) { data.Add(((DateTime)rdr["date"]).ToString("MM-yyyy"), (int)rdr["visits"]); } } } return data; } }