I have a problem with a For loop, it looks like this
for (int i = 0; i < dt.Rows.Count; i++)
//for (int i = 0; i < System.Math.Min(dt.Rows.Count, 3); i++)
{
string date = Convert.ToDateTime(dt.Rows[i]["date"]).ToShortDateString();
schedule[date] = (schedule[date] != null ? schedule[date].ToString() : "") + Server.HtmlEncode(dt.Rows[i]["todo"].ToString()) + "<br />" + dt.Rows[i]["time"].ToString() + "<br />";
}
return schedule;
It's for a Calendar that I have made with an asp.net calendar control. It loops through all records into my Database and gives back my Schedule (records of that date) but I dont want to show more than 3 lines of text that you can add to the calendar(database record). Have you any idea how i can do this ?
Thank you, kind regards, The Designer