Unable to let ajax calendar appear twice from the textbox
I have created a search function where the user will be able to select the
search field from the dropdownlist. For example, the field can contain
data such as default value "---Select---", "incidentdate", "memberid". In
my condition, i have put this
if (ddlCategory.SelectedItem.Text.Equals("incidentdate"))
{
CalendarExtender myCalExt = new CalendarExtender();
myCalExt.TargetControlID = "txtData";
myCalExt.Enabled = true;
Place1.Controls.Add(myCalExt);
}
if (!ddlCategory.SelectedItem.Text.Equals("--- Select ---"))
{
txtData.ReadOnly = false;
}
else
{
txtData.ReadOnly = true;
}
This basically allow the ajax calendar to appear whenever the user select
the ddl text incident date. The user will then have to click the search
button before the webapp will display any data. However, if the user
failed to search a data from the date he select from the calendar, the
user will not be able to re-select the date as the ajax calendar will not
appear again. In fact, tt will only re-appear if the user re-select the
"incidentdate".
Why is this so? My condition has already mentioned that if the Text equals
to incidentdate, the calendar will appear.
Regards.
No comments:
Post a Comment