/// <summary> /// method to bind data to ModuleDropDownList from database /// </summary> public void getModule() { WorkFlowBO objWorkFlow = new WorkFlowBO(); WorkFlowBLL WorkFlowBLLobj = new WorkFlowBLL(); WorkFlowList objWorkFlowList = new WorkFlowList(); objWorkFlowList = WorkFlowBLLobj.getAllModule(); ddlModuleDropDownList.DataSource = objWorkFlowList;//dt.Tables[0]; ddlModuleDropDownList.DataTextField = "MODULENAME"; ddlModuleDropDownList.DataValueField = "MODULEID"; ddlModuleDropDownList.DataBind(); ddlModuleDropDownList.Items.Insert(0, new ListItem("-- Select --", "0")); ddlModuleDropDownList.SelectedIndex = 0; }