CommandName?

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">
<asp:DataList 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
 
A

Arpan

Thanks, Patrick, for the link.
Stick to MSDN for a while

You are very much correct.......I should have gone through MSDN before
asking questions but the problem is the .NET Framework is such a
gigantic subject that searching for something can become quite tedious
:)

In fact, I have got the entire (372MB!) .NET Framework 2.0 SDK
installed in my machine & to be very honest, I first search it if I get
stuck somewhere & on most occasions, I get confused which compels me to
post my question in this NewsGroup.

Thanks once again,

Regards,

Arpan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,899
Latest member
RodneyMcAu

Latest Threads

Top