How to fill a DropDownlist using Subsonic 3

Tags:

 

 

How to populate a DropDownList using Subsonic 3.

var

titles = catalog.data.title.All();

 

foreach (var item in titles)
{
  DropDownList.Items.Add(
new ListItem(item.id, item.prefix.Trim()));
}

 

Comments

Post new comment

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <img>
  • Lines and paragraphs break automatically.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Enter the characters shown in the image.