how to bind data in dropdownlist without using datasource in asp.net

string strEmployee = "Sample-123";
                        string[] strarr = strEmployee.Split('-');
                        ((DropDownList)e.Row.FindControl("ddlEmployee")).Items.Insert(0, new ListItem(strEmployee,strarr[0]));
                  Text            Value

Comments

Popular posts from this blog

How to write Pure java script Program?