A
Arpan
Consider the following code which creates a DataList server control
which displays records from a SQL Server database table (the database
code along with other necessary code within the <script> tag aren't
reproduced here):
<form runat="server">
<aspataList ID="dlUsers" OnItemCommand="ItemList" DataKeyField="ID"
RepeatLayout="table" RepeatDirection="horizontal" runat="server">
<ItemTemplate>
<asp:LinkButton ID="linkbut" CommandName="ComName" runat="server"><%#
Container.DataItem("FirstName") %></asp:LinkButton>
</ItemTemplate>
What is the use of the property "CommandName"? Even if I modify its
attribute "ComName" or even delete that property, it doesn't make any
difference.
Moreover, I am not using the attribute "ComName" anywhere in the entire
code.
Thanks,
Arpan
which displays records from a SQL Server database table (the database
code along with other necessary code within the <script> tag aren't
reproduced here):
<form runat="server">
<aspataList ID="dlUsers" OnItemCommand="ItemList" DataKeyField="ID"
RepeatLayout="table" RepeatDirection="horizontal" runat="server">
<ItemTemplate>
<asp:LinkButton ID="linkbut" CommandName="ComName" runat="server"><%#
Container.DataItem("FirstName") %></asp:LinkButton>
</ItemTemplate>
What is the use of the property "CommandName"? Even if I modify its
attribute "ComName" or even delete that property, it doesn't make any
difference.
Moreover, I am not using the attribute "ComName" anywhere in the entire
code.
Thanks,
Arpan