Automatic Binding of Days, Months, Years to a DropDownList Control
plz reply ASAP...i am a beginner want clear explantion
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
sagar patilPosted Aug 16, 2012, 3:23 AM
{
//For binding Year
for(int intyear=1900;intyear
drpYear.add(intyear);
}
//For binding month
for(int intmonth=1;intmonth<13 ;intmonth++)
{
drpMonth.add(intmonth);
}
}
//selected months event
selectedIndex_drpMonth()
{
int intyr=convert.toInt16( drpYear.selectedItem.value);
int days=28;
if(intyr%4==0)
{
days=29;
}
swich(drpYear.selectedItem.value)
{
// write all codition for every month.
}
}
jyothsna chinnaPosted Aug 16, 2012, 2:50 AM
jyothsna chinnaPosted Aug 16, 2012, 2:44 AM
Jaganathan BantheswaranPosted Aug 16, 2012, 2:30 AM
Question is not clear.
Please explain your scenario where & when you want to automatically bind ? whether the values are from DB or XML or hard-coded ?