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 3 6532
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 http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
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" <na***@sina.com> wrote in message
news:uG**************@TK2MSFTNGP10.phx.gbl... 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
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 http://www.takempis.com
Big things are made up
of lots of little things
"Prasad" <pr********@hotmail.com> wrote in message
news:Oc**************@tk2msftngp13.phx.gbl... 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" <na***@sina.com> wrote in message news:uG**************@TK2MSFTNGP10.phx.gbl... 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
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Steve Amey |
last post by:
Hi all
I am creating a basic control to perform some tasks, and I want to declare
some events to be raised so they can be handled from the form that the
control is on. I can create my own Event...
|
by: Rajat Tandon |
last post by:
Hello there,
I am relatively new to the newsgroups and C#. I have never been disappointed
with the groups and always got the prompt replies to my queries.This is yet
another strange issue, I am...
|
by: Savin Igor |
last post by:
What can be done in Session_End()?
Can I get something from Session in this handler?
My Global.asax.cs is below
using System;
using System.Collections;
using System.ComponentModel;
using...
|
by: Nathan Sokalski |
last post by:
What is the difference between the Page_Init and Page_Load events? When I
was debugging my code, they both seemed to get triggered on every postback.
I am assuming that there is some difference,...
|
by: Jay |
last post by:
Everywhere I go (read/browse) I see these parameters....
ByVal sender As Object, ByVal e As System.EventArgs
Yet I never see them used within the function/method.
Could someone tell me what they...
|
by: Charles Law |
last post by:
Take a solution with a project hierarchy along the lines of an n-tier
system, so that we have a data layer, business layer and presentation layer.
The presentation layer is coupled to the business...
|
by: StriderBob |
last post by:
Situation :
FormX is mdi child form containing 2 ListViews
ListView1 contains a list of table names and 4 sub items with data about
each table.
ListView2 contains a list of the columns on each...
|
by: Mahesh Devjibhai Dhola [MVP] |
last post by:
Hi,
I have added few of the events in some control, example code is:
btnControl.GotFocus +=new EventHandler(EventHandlingMethod);
btnControl.Click +=new EventHandler(EventHandlingMethod);...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
| |