(Object source, EventArgs e)

Discussion in 'ASP .Net' started by Trevor Hartman, Jun 26, 2003.

  1. Hi,
    You know the parameters i'm talking about? void whatever (Object source,
    EvenArgs e)? how do you go about using those parameters? I need to get the
    ID of the source object (this is the event handling function for that
    object). How do i do this?
    thanks
    -trevor
    Trevor Hartman, Jun 26, 2003
    #1
    1. Advertising

  2. thanks a lot
    - Trevor

    "Kevin Spencer" <> wrote in message
    news:%...
    > Cast the source as System.Web.UI.Control and get the ID from it:
    >
    > string strID = ((System.Web.UI.Control) sender).ID;
    >
    > HTH,
    >
    > Kevin Spencer
    > Microsoft FrontPage MVP
    > Internet Developer
    > http://www.takempis.com
    > Big things are made up of
    > lots of Little things.
    >
    >
    > "Trevor Hartman" <> wrote in message
    > news:eOw05y$...
    > > Hi,
    > > You know the parameters i'm talking about? void whatever (Object

    source,
    > > EvenArgs e)? how do you go about using those parameters? I need to get

    > the
    > > ID of the source object (this is the event handling function for that
    > > object). How do i do this?
    > > thanks
    > > -trevor
    > >
    > >

    >
    >
    Trevor Hartman, Jun 26, 2003
    #2
    1. Advertising

  3. Cast the source as System.Web.UI.Control and get the ID from it:

    string strID = ((System.Web.UI.Control) sender).ID;

    HTH,

    Kevin Spencer
    Microsoft FrontPage MVP
    Internet Developer
    http://www.takempis.com
    Big things are made up of
    lots of Little things.


    "Trevor Hartman" <> wrote in message
    news:eOw05y$...
    > Hi,
    > You know the parameters i'm talking about? void whatever (Object source,
    > EvenArgs e)? how do you go about using those parameters? I need to get

    the
    > ID of the source object (this is the event handling function for that
    > object). How do i do this?
    > thanks
    > -trevor
    >
    >
    Kevin Spencer, Jun 26, 2003
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Kathy Burke
    Replies:
    2
    Views:
    5,121
    Kevin Spencer
    Aug 1, 2003
  2. Showjumper
    Replies:
    2
    Views:
    1,790
    Showjumper
    Aug 2, 2003
  3. mswc.net
    Replies:
    2
    Views:
    635
    Kevin Spencer
    Apr 26, 2005
  4. mike
    Replies:
    2
    Views:
    2,775
  5. Bob
    Replies:
    2
    Views:
    2,772
Loading...

Share This Page