Ask a Question related to ASP.NET General, Design and Development.
-
Yangtsi River #1
what is EventArgs
Hi,
in any event procudure,there is two paras:sender As Object, e As EventArgs,
i copied them-not know what they are about, and my ASPX works.
I guess the sender is the control by which I triggered this sub, and what is
EventArgs then?
I am passing a third para to the sub, that is mysub("jim",sender As Object,
e As EventArgs),
the sub is defined like :
mysub(ByVal Nickname as string,sender As Object, e As EventArgs)
if nickname="jim" then
sdfsdfsd
end if
end sub
but when I call mysub("jim",sender As Object, e As EventArgs),, it said I
provided nothing about eventargs.
when I call mysub("jim"), it doesn't work too.
THe sub is a event sub, triggered by a clicking a button.
Can any one give me a hit ?
Thanx
Yangtsi River
Yangtsi River Guest
-
What does (ByVal sender As System.Object, ByVal e As System.EventArgs) mean?
I just don't get what the () after the sub name does...kind of stupid question, but it would be nice to understand it. Thanks. Kathy *** Sent... -
Why are sender and object used as in sender As System.Object, ByVal e As System.EventArgs?
Why specifically are sender and object used? I could use dfs as Object and l as Evenat args. Some books show s instead of sender. Just wondering why... -
How to set default to TRUE: Overrides Function OnBubbleEvent(ByVal source As Object, ByVal args As EventArgs) As Boolean?
Hello, how can I set the default value to TRUE of Overrides Function OnBubbleEvent(ByVal source As Object, ByVal args As EventArgs) As Boolean ?... -
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... -
(Object source, EventArgs e)
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... -
Natty Gur #2
Re: what is EventArgs
Hi,
EventArgs is a base type for classes that contain event data. One should
use this class to indicate that the current event isn’t containing any
event data.
by the way, what are trying to do ? Why do you create functions that
receive events arguments ?
Natty Gur, CTO
Dao2Com Ltd.
28th Baruch Hirsch st. Bnei-Brak
Israel , 51114
Phone Numbers:
Office: +972-(0)3-5786668
Fax: +972-(0)3-5703475
Mobile: +972-(0)58-888377
Know the overall picture
*** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
Don't just participate in USENET...get rewarded for it!
Natty Gur Guest
-
Prasad #3
Re: what is EventArgs
Hi
When an Event is raised we need to which object [Control] is raised the
event. It is specified by the sender and sometimes the Event raising object
has to pass some values to the code which is handling event those values are
passed in the EventArgs.
eg. Assume We are moving the mouse in the form. The Event raised in
MouseMove. In the MouseMove event handling code the sender is the Form and
we also need to what is the X,Y position of the mouse which is obtained from
MouseEventArgs argument.
HTH
Prasad
"Yangtsi River" <nakhi@sina.com> wrote in message
news:uGHjaTpRDHA.2460@TK2MSFTNGP10.phx.gbl...EventArgs,> Hi,
> in any event procudure,there is two paras:sender As Object, e Asis> i copied them-not know what they are about, and my ASPX works.
>
> I guess the sender is the control by which I triggered this sub, and whatObject,> EventArgs then?
>
> I am passing a third para to the sub, that is mysub("jim",sender As> e As EventArgs),
> the sub is defined like :
> mysub(ByVal Nickname as string,sender As Object, e As EventArgs)
> if nickname="jim" then
> sdfsdfsd
> end if
> end sub
> but when I call mysub("jim",sender As Object, e As EventArgs),, it said I
> provided nothing about eventargs.
> when I call mysub("jim"), it doesn't work too.
>
> THe sub is a event sub, triggered by a clicking a button.
>
> Can any one give me a hit ?
>
> Thanx
> Yangtsi River
>
>
>
>
Prasad Guest
-
Kevin Spencer #4
Re: what is EventArgs
First of all, writing a server-side event handler to handle mouse movements
is going to initialte a PostBack from the client every time the mouse moves
one pixel in the browser. It's best to write client-side JavaScript event
handlers for that sort of thing. As for server-side event handlers for
controls that contain data in them, it's really a simple matter of writing a
custom Server Control that inherits the base class and provides its own
custom Event arguments class that inherits EventArgs and extends it with the
properties you need to contain the data.
--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
[url]http://www.takempis.com[/url]
Big things are made up
of lots of little things
"Prasad" <prasadh_ms@hotmail.com> wrote in message
news:OcoxjJqRDHA.2768@tk2msftngp13.phx.gbl...the> Hi
>
> When an Event is raised we need to which object [Control] is raisedobject> event. It is specified by the sender and sometimes the Event raisingare> has to pass some values to the code which is handling event those valuesfrom> passed in the EventArgs.
>
> eg. Assume We are moving the mouse in the form. The Event raised in
> MouseMove. In the MouseMove event handling code the sender is the Form and
> we also need to what is the X,Y position of the mouse which is obtainedwhat> MouseEventArgs argument.
>
> HTH
> Prasad
>
> "Yangtsi River" <nakhi@sina.com> wrote in message
> news:uGHjaTpRDHA.2460@TK2MSFTNGP10.phx.gbl...> EventArgs,> > Hi,
> > in any event procudure,there is two paras:sender As Object, e As> > i copied them-not know what they are about, and my ASPX works.
> >
> > I guess the sender is the control by which I triggered this sub, andI> is> Object,> > EventArgs then?
> >
> > I am passing a third para to the sub, that is mysub("jim",sender As> > e As EventArgs),
> > the sub is defined like :
> > mysub(ByVal Nickname as string,sender As Object, e As EventArgs)
> > if nickname="jim" then
> > sdfsdfsd
> > end if
> > end sub
> > but when I call mysub("jim",sender As Object, e As EventArgs),, it said>> > provided nothing about eventargs.
> > when I call mysub("jim"), it doesn't work too.
> >
> > THe sub is a event sub, triggered by a clicking a button.
> >
> > Can any one give me a hit ?
> >
> > Thanx
> > Yangtsi River
> >
> >
> >
> >
>
Kevin Spencer Guest



Reply With Quote

