Results 1 to 3 of 3
  1. #1
    Join Date
    Dec 2004

    Unanswered: Calendar function in ASP.Net


    I'm building an ASP.Net application that connects to a SQL Server DB. I want one form of the application to display a calendar(preferably showing the current month and the next month only). The user should then be able to select multiple dates from the 2 months displayed. I'll then provide a submit button that will write these selected dates to the database. Can I use the Calendar provided in for this, if so how do I get this to allow the selection of multiple dates? And if I can't use this, what should I use instead, javascript?

    All suggestions greatly appreciated!!

  2. #2
    Join Date
    Mar 2004
    London, UK
    yes you should be fine with using the .net calendar control.

    be aware however that it's a web control so you will need to do your development strictly in visual studio for the pages where you place it.

    i'm going to, i have a similar project to undertake.

  3. #3
    Join Date
    Dec 2004

    ASP.Net Calendar - Help Needed!

    Thank you for your reply. I've have spent a considerable amount of time trying to get this to work but am still having problems. The calendar will only appear on one page of the application so thats not a problem. I want the user to be able to select multiple dates.

    How do I keep track of dates that the user clicks on? I tried to write some code behind the Calendar1_SelectionChanged method as follows but nothing happens!!

    private void Calendar1_SelectionChanged(object sender, System.EventArgs e)

    string day = Calendar1.SelectedDate.ToShortDateString();

    //here I am trying to add any date that the user picks on the calendar to
    //the days arraylist(declared publically)


    private void btnDate_Click(object sender, System.EventArgs e)
    //testing to see if the array is filling - getting 0 so its not!

    String d = days.Count.ToString();

    lblDP.Text= "Number of elements in array: " + d;

    Can anyone help?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts