locked
custom dropdown and calendar control meshup RRS feed

  • Question

  • User148057660 posted

    Here is what I have done so far:

    1. There are 2 controls in a new web control. They are the dropdown, and calendar control respectively. The former control stays visible, while the latter is not.

    2. The dropdown control by default has 2 collection item. When it loads it sets the 1st item to today's date, and the 2nd item simply shows the text "Select another date"

    3. When user selects "Select another date" the event method is defined so that the calendar controls visibility is on


    I have defined all the necessary methods. Unfortunately, none of the events are firing. Any thoughts, recommendations, or useful articles that point to better solutions? Thanks in advance for your thoughtful responses!


    Here is a bit of the snippet of code (nothing too complicated):


        protected void Cl_Calendar_SelectionChanged(object sender, EventArgs e)
        {
            this.Ddl_Date.Items[0].Text = this.Cl_Calendar.SelectedDate.ToString();
            this.Ddl_Date.Items[0].Value = this.Cl_Calendar.SelectedDate.ToString();
            this.Ddl_Date.Visible = false;
        }
        protected void Ddl_Date_Load(object sender, EventArgs e)
        {
            this.Ddl_Date.Items[0].Text = DateTime.Now.ToString();
            this.Ddl_Date.Items[0].Value = DateTime.Now.ToString();
            this.Ddl_Date.SelectedIndex = 0;
        }
    
        protected void Ddl_Date_SelectedIndexChanged(object sender, EventArgs e)
        {
            this.Cl_Calendar.Visible = true;
        }


    Wednesday, October 21, 2009 2:33 PM

Answers

  • User148057660 posted

    Setting autopost enabled to true does raise the target methods.

    At this point, I've the option to use either 3rd party control or look for ajax solutions.


    Any suggestions are still welcome. Thanks.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, October 21, 2009 3:18 PM