Hi Narasiman,
I tried some code for your requirement, try this
public void Page_Load(object sender, EventArgs e)
{
List<string> strVal=new List<string>();
strVal.Add("Excellent");
strVal.Add("Good");
strVal.Add("Super");
strVal.Add("Average");
strVal.Add("Bad");
BindDDLValue(strVal,DropDownList1);
BindDDLValue(strVal, DropDownList2);
BindDDLValue(strVal, DropDownList3);
}
private void BindDDLValue(List<string> listVal, DropDownList ddl)
{
if (ddl != null)
{
ddl.DataSource = listVal;
ddl.DataBind();
}
}
Which will apt to your requirement I believe. try this and lemme know.
You can pass any number of dropdown control to the method it will bind and give it back to you.
Regards,
RK