473,406 Members | 2,312 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

CommandName?

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 <scripttag 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

Aug 2 '06 #1
2 1999
Mr Arpan please got through:-
http://msdn2.microsoft.com/en-us/lib...mmandname.aspx
Stick to MSDN for a while
Patrick

"Arpan" <ar******@hotmail.comwrote in message
news:11*********************@i42g2000cwa.googlegro ups.com...
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 <scripttag 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

Aug 3 '06 #2
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
Patrick.O.Ige wrote:
Mr Arpan please got through:-
http://msdn2.microsoft.com/en-us/lib...mmandname.aspx
Stick to MSDN for a while
Patrick

"Arpan" <ar******@hotmail.comwrote in message
news:11*********************@i42g2000cwa.googlegro ups.com...
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 <scripttag 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
Aug 3 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: John Blair | last post by:
Hi, The OnSelectedIndexChanged event only seems to fire if commandname = "select" if i change it to anything else if does not fire. Can anyone explain why this is the case given this name is...
0
by: Irfi | last post by:
Alright, here’s what I want to do. I have a GridView with columns say EmployeeID, FirstName, LastName, and Department. Now, I want to add an additional column with the DropDownList. The list has the...
4
by: Dabbler | last post by:
I'm trying to code a FormView page to return to the Gridview List if the user clicks the Cancel button while in insert mode but nothing happens with the following code: void...
0
by: ChemFinder | last post by:
I created a DataGrid with a templated field: <asp:TemplateField HeaderText="Status"> <ItemTemplate> <asp:DropDownList ID="ddlScreenStatus" runat="server" Style="z-index: 100; ">...
0
by: lifenetjon | last post by:
I have a report menu page generated via a datagrid from an xml file. One of the columns on the menu page is a buttoncolumn. I thot I'd set the commandname of the buttoncolumn to the URL of the...
3
by: dvanderwel | last post by:
I have a .NET 1.1 web page with a DataGrid containing a TemplateColumn that contains a DropDownList. I need to fire an event when the selected item in the DropDownList changes for the current...
2
by: Brian Simmons | last post by:
Hi All, I've searched a bunch of different places and cannot seem to find a concrete answer to this. This past weekend I was watching some .NET training videos and noticed that they were...
2
by: RN1 | last post by:
Suppose I have a LinkButton whose Text is the name of a user (which is being retrieved from a database). What I want is when I click this LinkButton, I want the e-mail id of the user (which will be...
1
by: Jim McGivney | last post by:
In VWD I have a webpage that contains a number of ImageButtons. Each ImageButton has a unique CommandName (e.g. IB1, IB2, etc). I can tell which ImageButton has been pressed by testing for the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.