473,386 Members | 1,712 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,386 software developers and data experts.

CommandName values, documented?

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 using CommandName property on a Button in a Multiview control (or
more specifically in Views of the Multiview control).

Just by setting the CommandName property on the Buttons to things like:
PrevView, NextView, SwitchViewByIndex (& utilizing the CommandArgument
property), SwitchViewByID (& utilizing the CommandArgument property)

They were able to switch the views without any code. As I dug deeper, I
discovered that when using buttons in a GridView, I could do CommandNames
like Edit, Update, Insert, Delete, etc... and have the GridView
automatically switch templates.

My question: is there a comprehensive list of all the CommandNames for all
Controls (dependent on where they're used)?

Thanks,
Brian
Feb 11 '08 #1
2 3704
Check the doc for the XXCommand event in which the command name is used for
the particular control you are interested in... For example, for the
gridview, this is used in the RowCommand event that is :
http://msdn2.microsoft.com/en-us/lib...owcommand.aspx
where you'll find a table for available values...

--
Patrice

"Brian Simmons" <ce******@newsgroup.nospama écrit dans le message de news:
ud**************@TK2MSFTNGP02.phx.gbl...
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 using CommandName property on a Button in a Multiview
control (or more specifically in Views of the Multiview control).

Just by setting the CommandName property on the Buttons to things like:
PrevView, NextView, SwitchViewByIndex (& utilizing the CommandArgument
property), SwitchViewByID (& utilizing the CommandArgument property)

They were able to switch the views without any code. As I dug deeper, I
discovered that when using buttons in a GridView, I could do CommandNames
like Edit, Update, Insert, Delete, etc... and have the GridView
automatically switch templates.

My question: is there a comprehensive list of all the CommandNames for all
Controls (dependent on where they're used)?

Thanks,
Brian

Feb 11 '08 #2
Hi Brian,

To see each control's supported command names, you can check related
*Command events as Patrice suggested.

To understand how the CommandName works, you can refer to a technique
called "event bubbling" in ASP.NET:

Bubbling an Event
(http://msdn2.microsoft.com/en-us/lib...44(VS.71).aspx)
Hope this helps.
Regards,
Walter Wang (wa****@online.microsoft.com, remove 'online.')
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.

Feb 12 '08 #3

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

Similar topics

29
by: John Wood | last post by:
Even though CSC does its best to detect use of unassigned variables, it often misses it... for example if you just declare a double in a class without assigning a default value, it has a default...
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: 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...
2
by: Arpan | last post by:
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...
2
by: Anthon | last post by:
I have a small C program that restarts a python based server application if the exit value of the system("python -m pythonscript arg1 arg2 ...") is greater than 127 (using WEXITSTATUS on 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: 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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...

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.