i am using the following code to add elements to a dropwdownlist
DDL3.Items.Add(new ListItem("Full Time","10")); i this piece of code as u can see ive added the name Fulltime which has and index value of10 this is stored in a database. however full time has 2 index values it can be either 10 which i have stated or it could also be 50 any suggestion of how to add this to the list. ive tried the following statemnt but its not the correct syntax
DDL3.Items.Add(new ListItem("Full Time","10"||"50");
3 Replies
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
VulpesPosted Aug 28, 2013, 4:49 PM
So these operators don't work with strings and if you want to specify multiple values you need to use them within the string as in my example.
EamonnPosted Aug 28, 2013, 3:54 AM
DDL3.Items.Add(new ListItem("Full Time","10"|"50");
VulpesPosted Aug 27, 2013, 11:24 AM
}