I have 3 dropdownlist named as dd1,dd2 and dd3.
in dd1 i have datas getting from database.
then in dd2 bound the data by selecting the dd1 datas...
tat coding is
========
protected void dd1_SelectedIndexChanged(object sender, EventArgs e)
{
string a = "select distinct a.descriptions,a.sid from swift a,pc_link b where swiftid='loc'and a.sid=b.locationid and blockid="+dd1.SelectedValue;
adp = new SqlDataAdapter(a, con);
ds = new DataSet();
adp.Fill(ds, "swift");
dd2.DataSource = ds.Tables["swift"].DefaultView;
dd2.DataTextField = "descriptions";
dd2.DataValueField = "sid";
dd2.DataBind();
}
like wise dd3 also will be filled. i have set autopostback=true also.
but my problem is when the dd1 has only one data
then dd2 is not filled.because i have written in selectedindexchanged so based on the dd1 value it ll change
but if it has one data then it s not coming.
so pls suggest me for this problem .
Thank you,