Joydip Kanjilal
"ASP.NET Data Presentation Controls Essentials"
aspx file is as follows.
asp:ListView>
Working with LINQ
[ 222 ]
The ListView control in ASP.NET supports the following templates for customization.
ItemTemplate
LayoutTemplate
EmptyItemTemplate
EmptyDataTemplate
SelectedItemTemplate
EditItemTemplate
AlternatingItemTemplate
InsertItemTemplate
ItemSeparatorTemplate
GroupTemplate
GroupSeparatorTemplate
I will now show you how to use the ListView control to display data without writing
even a single line of code. Configure the DataSource property of the ListView
control to a valid DataSource. Refer to the following screenshot:
??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ???
Chapter 8
[ 223 ]
We will skip this section on configuring the DataSource as we have already
discussed it with other controls in Chapter 1 of this book. Once you have
configured the DataSource, you can configure the ListView control using the
ConfigureListView option of the n ListView control in the design view mode of the
web page. When you select the above option, the window shown in the following
screenshot pops up:
Working with LINQ
[ 224 ]
Select Professional in the Select a Style option and then click on the OK button.
When you execute the application, the output is similar to what is shown in the
following screenshot:
Using the DataPager Control
The DataPager control in Orcas can be used for custom paging using the ListView
control.
Pages:
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211