•Which template must you provide, in order to display data in a Repeater control?
You have to use the ItemTemplate to Display data. Syntax is as follows,
< ItemTemplate >
< div class =”rItem” >
< img src=”images/<%# Container.DataItem(“ImageURL”)%>” hspace=”10” />
< b > <% # Container.DataItem(“Title”)%>
< /div >
< ItemTemplate >
•How can you provide an alternating color scheme in a Repeater control?
Using the AlternatintItemTemplate
•What property must you set, and what method must you call in your code, in order to bind the data from some data source to the Repeater control?
Set the DataMember property to the name of the table to bind to. (If this property is not set, by default the first table in the dataset is used.)
DataBind method, use this method to bind data from a source to a server control. This method is commonly used after retrieving a data set through a database query.
Sunday, December 28, 2008
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment