01.
<asp:DataList ID=
"DataList1"
runat=
"server"
CellPadding=
"4"
ForeColor=
"#333333"
>
02.
<FooterStyle BackColor=
"#990000"
Font-Bold=
"True"
ForeColor=
"White"
/>
03.
<AlternatingItemStyle BackColor=
"White"
/>
04.
<ItemStyle BackColor=
"#FFFBD6"
ForeColor=
"#333333"
/>
05.
<SelectedItemStyle BackColor=
"#FFCC66"
Font-Bold=
"True"
ForeColor=
"Navy"
/>
06.
<HeaderStyle BackColor=
"#990000"
Font-Bold=
"True"
ForeColor=
"White"
/>
07.
<ItemTemplate>
08.
<asp:Label ID=
"Label1"
runat=
"server"
Text=
'<%# Eval("Name") %>'
></asp:Label>
09.
<asp:Image ID=
"Image1"
ImageUrl=
'<%# Eval("Picture") %>'
runat=
"server"
/>
10.
<asp:Label ID=
"Label2"
runat=
"server"
Text=
'<%# Eval("Age") %>'
></asp:Label>
11.
</ItemTemplate>
12.
</asp:DataList>
13.
14.
dbm.CommandString =
"Select * From [Emp]"
;
15.
dt = dbm.ExecuteQuery();
16.
17.
int
i = dt.Rows.Count - 1;
18.
19.
for
(
int
x = 0; x < i; x++)
20.
{
21.
Response.ContentType =
"image/jpeg"
;
22.
Response.BinaryWrite((
byte
[])dt.Rows[i][
"Picture"
]);
23.
}