Previous generation:
View code
1 <Asp: datalist id = " Dldata " Runat = " Server " Cssclass = " Table01 " Horizontalalign = " Center " >
2 <Headertemplate>
3 <Table width = " 78% " Border = " 0 " Cellpadding = " 0 " Cellspacing = " 0 " Class = " Table01 " Align = " Center " >
4 <Tr Class = " TR3 " >
5 <TH colspan = " 2 " >
6 Answer
7 </Th>
8 </Tr>
9 </Headertemplate>
10 <Itemtemplate>
11 <Tr Class = " Tr1 " >
12 <TD width = " 148 " >
13 Answer content:
14 </TD>
15 <TD width = " 622 " Class = " TD1 " >
16 <% # Eval ( " S_write " ) %>
17 </TD>
18 </Tr>
19 <Tr>
20 <TD>
21 Attachment of the contractor:
22 </TD>
23 <TD Class = " TD1 " >
24 <Asp: hyperlink id = " Hlupload_file " Runat = " Server " TEXT = ' <% # Eval ("upload_file") %> '
25 Navigateurl = ' <% #"~ /File/"+ eval (" upload_file "). tostring () %> ' Target = " _ Blank " > </ASP: hyperlink>
26 <% -- <% # Eval ( " Upload_file " ) %> -- %>
27 </TD>
28 </Tr>
29 <Tr Class = " Tr1 " >
30 <TD>
31 Answer:
32 </TD>
33 <TD Class = " TD1 " >
34 <% # Eval ( " Name " ) %>
35 </TD>
36 </Tr>
37 </Itemtemplate>
38 <Footertemplate>
39 </Table>
40 </Footertemplate>
41 </ASP: datalist>
Effect evaluation: the data query result is added to the dynamic table. The data statistics are the same as those in the gridview.