Repeater control usage Summary

Source: Internet
Author: User

Preface:

From Treeview, to the gridview, to the repeater, although it has gone through "tossing", we have also summarized what we have learned. Here we will make a summary of the use of the repeater.

 

Resolution:

Use the same method as the previous blog post <pass the page and user control value> to replace the gridview with the Repeater control. The backgroundCodeSame, that is, specify the data source and then bind it. The front-end code is:

 

  < ASP: repeater ID = " Rpremark " Runat = " Server " >
< Itemtemplate >
< Table border = " 0 " Width = " 100% " >
< Tr >
< TD Style = " Background-color: # eeeeee; color: #000000; font-size: 9pt; font-weight: 700; width: 300px; " >
<% # Databinder. eval (container. dataitem, " Author " ) %> & Nbsp & Nbsp
<% # Databinder. eval (container. dataitem, " Action " ) %>
[ <% # Databinder. eval (container. dataitem, " Create_time " ) %> ]
< / TD>
< TD align = " Right " Style = " Background-color: # eeeeee; color: #000000; font-size: 9pt; " >
<% # Databinder. eval (container. dataitem, " Display_author " ) %>
< / TD>
< / Tr>
< Tr >
< TD colspan = " 2 " Style = " Font-size: 9pt; padding: 5px; " > <% # Databinder. eval (container. dataitem, " Remark " ) %> < / TD>
< / Tr>
< / Table>
< / Itemtemplate>
< / ASP: repeater>

 

 

That is, the row data of the datatable is extracted and displayed. The result graph is as follows:

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.