Hi,
i have one dropdown
which display year in following format
2012-2013
2013-2014
now i have another dropdown
which displays month but its depend on financial year,
for eg:suppose if i select year 2013-2014 then i want to display month in dropdown
in following format
April 2013
march 2013
may 2013
june 2013
july 2013
august 2013
sept 2013
oct 2013
november 2013
december 2013
jan 2014
feb 2014
march 2014
this is because we consider year as financial year in which months start from april 2013 and end on march 2014 for year 2013-2014
Step1: get the
SelectedItem
from the YearDropDownList
.Step2: use
Split()
function to get the year values from theSelected
StringStep3: Append first year in selected Year to the months DropDownList from April to December.
Step4: Append Second Selected Year to the months DropDownList from january to March.
Try This:
Design Code:
Code Behind: