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

Wcf interview

Uses of all page notations in .Net like ASPX,ASMX,ASAX .................... in asp.net

checkbox all for radioButtonList Control Inside Gridview in Asp.Net C#