J
josh
Hi, I post this newbie question: I don't understand when I can use
<asp:something> and when I must use
only tag like <Columns>
Ex. in the following snippets I use <Colums> and then <asp:BoundFiled>
but which is the difference?
but the pager settings I can use as properties or like tag.
<asp:GridView ID="grid_view_1" runat="server"
DataSourceID="data_source_1" AutoGenerateColumns="false"
AllowPaging="true" PagerSettings-Mode="NextPreviousFirstLast"
PagerSettings-Position="Bottom">
<PagerStyle BackColor="Aqua" ForeColor="White" />
<Columns>
<asp:BoundField HeaderText="ID" DataField="au_id"
ReadOnly="true"
SortExpression="au_id" />
<asp:BoundField HeaderText="Last Name" DataField="au_lname"
SortExpression="au_lname" />
<asp:BoundField HeaderText="First Name" DataField="au_fname"
SortExpression="au_fname" />
<asp:BoundField HeaderText="Phone" DataField="phone"
SortExpression="phone" />
<asp:BoundField HeaderText="Address" DataField="address"
SortExpression="address" />
<asp:BoundField HeaderText="City" DataField="city"
SortExpression="city" />
<asp:BoundField HeaderText="State" DataField="state"
SortExpression="state" />
<asp:BoundField HeaderText="ZIP" DataField="zip"
SortExpression="zip" />
<asp:CheckBoxField HeaderText="contract" DataField="contract"
SortExpression="contract" />
</Columns>
</asp:GridView>
I'm confused!
Thanks
<asp:something> and when I must use
only tag like <Columns>
Ex. in the following snippets I use <Colums> and then <asp:BoundFiled>
but which is the difference?
but the pager settings I can use as properties or like tag.
<asp:GridView ID="grid_view_1" runat="server"
DataSourceID="data_source_1" AutoGenerateColumns="false"
AllowPaging="true" PagerSettings-Mode="NextPreviousFirstLast"
PagerSettings-Position="Bottom">
<PagerStyle BackColor="Aqua" ForeColor="White" />
<Columns>
<asp:BoundField HeaderText="ID" DataField="au_id"
ReadOnly="true"
SortExpression="au_id" />
<asp:BoundField HeaderText="Last Name" DataField="au_lname"
SortExpression="au_lname" />
<asp:BoundField HeaderText="First Name" DataField="au_fname"
SortExpression="au_fname" />
<asp:BoundField HeaderText="Phone" DataField="phone"
SortExpression="phone" />
<asp:BoundField HeaderText="Address" DataField="address"
SortExpression="address" />
<asp:BoundField HeaderText="City" DataField="city"
SortExpression="city" />
<asp:BoundField HeaderText="State" DataField="state"
SortExpression="state" />
<asp:BoundField HeaderText="ZIP" DataField="zip"
SortExpression="zip" />
<asp:CheckBoxField HeaderText="contract" DataField="contract"
SortExpression="contract" />
</Columns>
</asp:GridView>
I'm confused!
Thanks