Well, first off, I am a LINQ advocate. So what I would do, is get rid
of the SQL datasource and use a DataContext instead. Then I would
create a string from the data retrieve in LINQ and use that string as
the background of the string.

Really fast, and NOT TESTED:

SQLDataContext data = new SQLDataContext();
var colors = from c in data.color
where data.id = panel.id
select c;

Panel1.BackgroundColor = colors;

Fit to your code, and it should work.

Reply via email to