how to select the calendar from another calendar when the date is being selected
-
I am facing an output error. I am using a drop downlist which contains two items called "half day" and "full day" and two calendar controls. What i am in need is when i select the "full day" first it should show calendar1, after selecting the date in calendar1 it should display the next calendar control. then when i select the "half day". it should display only calendar1 and once clicking the date in the calendar1 the same should not be visible. Anyone kindly help me...
modified on Saturday, May 30, 2009 6:40 AM
-
I am facing an output error. I am using a drop downlist which contains two items called "half day" and "full day" and two calendar controls. What i am in need is when i select the "full day" first it should show calendar1, after selecting the date in calendar1 it should display the next calendar control. then when i select the "half day". it should display only calendar1 and once clicking the date in the calendar1 the same should not be visible. Anyone kindly help me...
modified on Saturday, May 30, 2009 6:40 AM
First,enable autopostback of DropDownlist,set
AutoPostBack=true;
On
SelectedIndexChange
of dropdownlist set visible to controls.
protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
{
Calendar1.Visible=true;
}and in event
SelectionChanged
of Calendar1 check which items is selected from DropDownList
private void Calendar1_SelectionChanged(object sender, System.EventArgs e)
{
if(DropDownList1.Text =="full day")
{
Calendar2.Visible=true;
}
else
{
Calendar2.Visible=false;
}}
Hope this will help you.
I Love T-SQL "Don't torture yourself,let the life to do it for you." If my post helps you kindly save my time by voting my post.
-
First,enable autopostback of DropDownlist,set
AutoPostBack=true;
On
SelectedIndexChange
of dropdownlist set visible to controls.
protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
{
Calendar1.Visible=true;
}and in event
SelectionChanged
of Calendar1 check which items is selected from DropDownList
private void Calendar1_SelectionChanged(object sender, System.EventArgs e)
{
if(DropDownList1.Text =="full day")
{
Calendar2.Visible=true;
}
else
{
Calendar2.Visible=false;
}}
Hope this will help you.
I Love T-SQL "Don't torture yourself,let the life to do it for you." If my post helps you kindly save my time by voting my post.
thank you the mistake was enabling the auto post back
-
thank you the mistake was enabling the auto post back