passing value using eventargs

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

    #1

    passing value using eventargs

    is there a way to pass values using the eventargs of a certain event, lets
    say onclick?? or how does everyone else pass values? lets say each button
    has 5 things (string, ints, etc) it needs to know, how can you pass that to
    the event handler?


  • Alvin Bruney

    #2
    Re: passing value using eventargs

    One option is to utilize the commandargument s argument.
    it's a read write property of the control retrievable thru event args ex.
    e.commandname

    "memememe" <[rem]casolorz[rem]@hot[rem]mail.com> wrote in message
    news:q9iOa.6477 87$vU3.612940@n ews1.central.co x.net...[color=blue]
    > is there a way to pass values using the eventargs of a certain event, lets
    > say onclick?? or how does everyone else pass values? lets say each button
    > has 5 things (string, ints, etc) it needs to know, how can you pass that[/color]
    to[color=blue]
    > the event handler?
    >
    >[/color]


    Comment

    • memememe

      #3
      Re: passing value using eventargs


      "Alvin Bruney" <vapordan_spam_ me_not@hotmail_ no_spamhotmail. com> wrote in
      message news:edMGAILRDH A.3144@tk2msftn gp13.phx.gbl...[color=blue]
      > One option is to utilize the commandargument s argument.
      > it's a read write property of the control retrievable thru event args ex.
      > e.commandname
      >
      > "memememe" <[rem]casolorz[rem]@hot[rem]mail.com> wrote in message
      > news:q9iOa.6477 87$vU3.612940@n ews1.central.co x.net...[color=green]
      > > is there a way to pass values using the eventargs of a certain event,[/color][/color]
      lets[color=blue][color=green]
      > > say onclick?? or how does everyone else pass values? lets say each[/color][/color]
      button[color=blue][color=green]
      > > has 5 things (string, ints, etc) it needs to know, how can you pass that[/color]
      > to[color=green]
      > > the event handler?
      > >
      > >[/color]
      >
      >[/color]

      I have used that but it wont solve my problem right now (actually not my
      problem, someone elses) because they are using the onlick event of something
      other than a button, and it does not have the command event.


      Comment

      • Kevin Spencer

        #4
        Re: passing value using eventargs

        Some .Net Event classes contain data in them. It sounds like you might need
        to create a custom Event Class and Event Handler delegate, in order to pass
        the data you specifically need. Is that correct?

        HTH,

        Kevin Spencer
        Microsoft FrontPage MVP
        Internet Developer
        All hotels in Benidorm. The best selection of Benidorm hotels with reviews and maps. Book in advance and save.

        Some things just happen.
        Everything else occurs.

        "memememe" <[rem]casolorz[rem]@hot[rem]mail.com> wrote in message
        news:q9iOa.6477 87$vU3.612940@n ews1.central.co x.net...[color=blue]
        > is there a way to pass values using the eventargs of a certain event, lets
        > say onclick?? or how does everyone else pass values? lets say each button
        > has 5 things (string, ints, etc) it needs to know, how can you pass that[/color]
        to[color=blue]
        > the event handler?
        >
        >[/color]


        Comment

        • memememe

          #5
          Re: passing value using eventargs


          "Kevin Spencer" <kevin@SPAMMERS SUCKtakempis.co m> wrote in message
          news:OnHHN2LRDH A.940@TK2MSFTNG P11.phx.gbl...[color=blue]
          > Some .Net Event classes contain data in them. It sounds like you might[/color]
          need[color=blue]
          > to create a custom Event Class and Event Handler delegate, in order to[/color]
          pass[color=blue]
          > the data you specifically need. Is that correct?
          >
          > HTH,
          >
          > Kevin Spencer
          > Microsoft FrontPage MVP
          > Internet Developer
          > http://www.takempis.com
          > Some things just happen.
          > Everything else occurs.
          >
          > "memememe" <[rem]casolorz[rem]@hot[rem]mail.com> wrote in message
          > news:q9iOa.6477 87$vU3.612940@n ews1.central.co x.net...[color=green]
          > > is there a way to pass values using the eventargs of a certain event,[/color][/color]
          lets[color=blue][color=green]
          > > say onclick?? or how does everyone else pass values? lets say each[/color][/color]
          button[color=blue][color=green]
          > > has 5 things (string, ints, etc) it needs to know, how can you pass that[/color]
          > to[color=green]
          > > the event handler?
          > >
          > >[/color]
          >
          >[/color]

          that would probably actually work (had considered similar scenarios), i just
          hope i can convince the person needing that thats the way to go.
          What about creating a class that extends lets say htmlanchor and on the
          onclick event it passes something on the event args, or it has some
          properties that can be read/write?


          Comment

          • Kevin Spencer

            #6
            Re: passing value using eventargs

            As to whether you can successfully override an event handler for an existing
            class, you would have to check that class to find out. It's not hard to
            create a custom Server Control either.

            HTH,

            Kevin Spencer
            Microsoft FrontPage MVP
            Internet Developer
            All hotels in Benidorm. The best selection of Benidorm hotels with reviews and maps. Book in advance and save.

            Some things just happen.
            Everything else occurs.

            "memememe" <[rem]casolorz[rem]@hot[rem]mail.com> wrote in message
            news:vUjOa.6481 27$vU3.216888@n ews1.central.co x.net...[color=blue]
            >
            > "Kevin Spencer" <kevin@SPAMMERS SUCKtakempis.co m> wrote in message
            > news:OnHHN2LRDH A.940@TK2MSFTNG P11.phx.gbl...[color=green]
            > > Some .Net Event classes contain data in them. It sounds like you might[/color]
            > need[color=green]
            > > to create a custom Event Class and Event Handler delegate, in order to[/color]
            > pass[color=green]
            > > the data you specifically need. Is that correct?
            > >
            > > HTH,
            > >
            > > Kevin Spencer
            > > Microsoft FrontPage MVP
            > > Internet Developer
            > > http://www.takempis.com
            > > Some things just happen.
            > > Everything else occurs.
            > >
            > > "memememe" <[rem]casolorz[rem]@hot[rem]mail.com> wrote in message
            > > news:q9iOa.6477 87$vU3.612940@n ews1.central.co x.net...[color=darkred]
            > > > is there a way to pass values using the eventargs of a certain event,[/color][/color]
            > lets[color=green][color=darkred]
            > > > say onclick?? or how does everyone else pass values? lets say each[/color][/color]
            > button[color=green][color=darkred]
            > > > has 5 things (string, ints, etc) it needs to know, how can you pass[/color][/color][/color]
            that[color=blue][color=green]
            > > to[color=darkred]
            > > > the event handler?
            > > >
            > > >[/color]
            > >
            > >[/color]
            >
            > that would probably actually work (had considered similar scenarios), i[/color]
            just[color=blue]
            > hope i can convince the person needing that thats the way to go.
            > What about creating a class that extends lets say htmlanchor and on the
            > onclick event it passes something on the event args, or it has some
            > properties that can be read/write?
            >
            >[/color]


            Comment

            Working...