Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / February 2008

Tip: Looking for answers? Try searching our database.

CommandName values, documented?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Brian Simmons - 11 Feb 2008 15:45 GMT
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
Patrice - 11 Feb 2008 16:17 GMT
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/library/system.web.ui.webcontrols.gridview.rowc
ommand.aspx

where you'll find a table for available values...

--
Patrice

> Hi All,
>
[quoted text clipped - 19 lines]
> Thanks,
> Brian
Walter Wang [MSFT] - 12 Feb 2008 03:00 GMT
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/library/aa719644(VS.71).aspx)

Hope this helps.

Regards,
Walter Wang (wawang@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.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.