1

I am calling a web service using a service reference in c# and have collected a list of date strings (collection dates) into an array list in a public class

public List DateList { get; set; }

I now want to load the dates into asp.net calendar so users can see what dates are available each month.

This should be simple but I am having trouble finding a way to do this? is it possible

1
  • Please share the code which you have tried so far for loading dates in asp.net calendar. Commented Mar 21, 2019 at 16:35

1 Answer 1

0

Are you looking to highlight some of the dates of the calendar control you may have a look at this. You can convert your list public List DateList { get; set; } to public static List<DateTime> list = new List<DateTime>(); and create a method that will render the control with the highlighted dates. This article provides the complete implementation here. Sample code used in the article. if (Session["SelectedDates"] != null) { List<DateTime> newList = (List<DateTime>)Session["SelectedDates"]; foreach (DateTime dt in newList) { Response.Write(dt.ToShortDateString() + "<BR/>"); } }

Sign up to request clarification or add additional context in comments.

1 Comment

That looks exactly what I am trying to do. Cheers for that.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.