I’m doing such a small web page that contain 4 main HTML div which should contain last 4 NEWS from a SQL Database.
so I’ve designed them, and put in each on a label control, and an Image control.
and to bind information from the SQL to them, I’ve used (DataView) object, and using a loop from 0 to 3 I’ve get the data I need.
but I believe that way is not the perfect one! so I need something more clear and effectiveness!
create an
<asp:repeater ... />control on your page and bind it to your SQL data source.Create the appropriate Select statement within your data source (or use LINQ, or whatever you like).
layout the repeater control something like this