CommandName values, documented?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Brian Simmons

    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, SwitchViewByInd ex (& 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

    #2
    Re: CommandName values, documented?

    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 :

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

    --
    Patrice

    "Brian Simmons" <centraso@newsg roup.nospama écrit dans le message de news:
    udLKjUMbIHA.434 4@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, SwitchViewByInd ex (& 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
    >

    Comment

    • Walter Wang [MSFT]

      #3
      RE: CommandName values, documented?

      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 (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.

      Comment

      Working...