Database Reference
In-Depth Information
Figure 11.26
Deine parameters.
11. Go back to the Design window of Default.aspx. In the Toolbox, from the
Data
sec-
tion, drag the
GridView
control as shown in Figure 11.27. Click the left arrow at the
upper right corner of the
GridView
control to open the
GridView
task menu. Select
ObjectDataSource1 from the
Choose Data Source
dropdown list and select
Edit
Columns
.
12. In the
Fields
dialog, keep
Name
,
RowKey
, and
PartitionKey
in the
Selected ields
as shown in Figure 11.28. hese three columns will be displayed in GridView. Click
OK
to complete the selection of ields.
13. In the
GridView Tasks
menu, click
Auto Format
. In the AutoFormat dialog, click
Simple
as shown in Figure 11.29. hen, click
OK
.
14. In ile
Default.aspx
, switch to the
Source
window. Make sure that
BoundField
is speciied for the columns
Name
,
RowKey
, and
PartitionKey
as shown in the
code below. Also, for the RowKey column, use
Email
as the
HeaderText
; for the
PartitionKey column, use
Club
as the
HeaderText
as shown in the following code:
<
asp:BoundField DataField
=
"Name" HeaderText
=
"Name"/
>
<
asp:BoundField DataField
=
"RowKey" HeaderText
=
"Email"
SortExpression
=
"RowKey"/
>
<
asp:BoundField DataField
=
"PartitionKey" HeaderText
=
"Club"
SortExpression
=
"PartitionKey"/
>