Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Key value pair problem (C#) asp.net

Status
Not open for further replies.

talon121a

MIS
Aug 21, 2003
92
US
I have the following Code that reads from a Dictionary and gets binded to a repeater;How do I call the "string" not the ID (key) of the item being called in another repeater? ie. When a user selects a checkbox, I want it to populate a second repeater with a name... I figure using the itemdatabound event, passing the ID and doing a lookup from that, and resetting the label.. (any ideas?)
 
I'm sure there is a way, but it would be cleaner and more explicit to use a POCO (plain old compiled object).
instead of
Code:
var dic = new Dicitionary
{
   {"name", "jason"},
   {"dob", new datetime (1/1/1901)},
   {"eye color", color.brown},
};
you would have
Code:
var person = new Person
{
   Name = "Jason",
   Dob = new datetime (1/1/1901),
   EyeColor = Color.Brown
};

Jason Meckley
Programmer

faq855-7190
faq732-7259
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top