Hi
I want to bind a picturebox Dynamically to an image field in database.
I use this code (I'm Using Northwind Database):
| using (DataClasses1DataContext dc=new DataClasses1DataContext()) |
| { |
| var a = from p in dc.Products |
| join c in dc.Categories |
| on p.CategoryID equals c.CategoryID |
| select new |
| { |
| ProductName=p.ProductName, |
| UnitPrice=p.UnitPrice, |
| UnitInStock=p.UnitsInStock, |
| CatName=c.CategoryName, |
| CatPic=c.Picture |
| }; |
| this.DataSource = a.ToList(); |
| } |
And when I set Value of picturebox to "=Fields.CatPic" Nothing display.
How I can do that
Thanx