I am binding my dropdownlist from the cs file.The value contained in the struser_type can be C,E or S. If it is C I want to display it as customer, E then employee and S then supplier. How to check it and display the corresponding value in the dropdown textfield.
ddl_user_type.DataSource = OBJLIST;
ddl_user_type.DataTextField = "struser_type";
ddl_user_type.DataValueField = "iuser_id";
ddl_user_type.DataBind();
Thanks,
You can use the following way to accomplish this:
First Collect all data from DB and iterate trough it using normal for loop:
Asssuming
OBJLISTis asDataset:This Should work for you….