473,404 Members | 2,114 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,404 software developers and data experts.

Error in source as object, e as envenargs

Al
hi , I am creating a form in asp.net and in the form, I
crateed a couple of buttons, when I call a function I get
the following error :
Method 'Public Sub (function name) does not have the same
signature as delegate ' Delegate Sub EventHandler(sender
as object, e as system.eventArgs)'

I figured out that I must put the following at my funcion
sub calcualte_int(source as object, e as EventArgs)
.. process
end sub

what if I want to pass a value to the above function, do I
add input parameter like this
sub calcualte_int(source as object, e as EventArgs , intID
as integer)
.. process
end sub

Thanks for your help. and sorry if this is a silly
question, I am new to asp.net though (:
Al
Jul 21 '05 #1
1 1290
The way to handle this is the following:
1. Create a new class that inherits from the
System.EventArgs class.
2. Add the property for the value you want to pass to the
method.
3. When you raise the event make sure you pass in your
inherited EventArgs class and the property you want to
pass is set correctly.

That's all there is to it.

Jeff Levinson
Author of "Building Client/Server Applications with
VB.NET: An Example Driven Approach"
-----Original Message-----
hi , I am creating a form in asp.net and in the form, I
crateed a couple of buttons, when I call a function I get
the following error :
Method 'Public Sub (function name) does not have the same
signature as delegate ' Delegate Sub EventHandler(sender
as object, e as system.eventArgs)'

I figured out that I must put the following at my funcion
sub calcualte_int(source as object, e as EventArgs)
.. process
end sub

what if I want to pass a value to the above function, do Iadd input parameter like this
sub calcualte_int(source as object, e as EventArgs , intIDas integer)
.. process
end sub

Thanks for your help. and sorry if this is a silly
question, I am new to asp.net though (:
Al
.

Jul 21 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: DraguVaso | last post by:
Hi, In my application, on some given actions while debugging in Visual Studio, I suddenly get a "System.ComponentModel.Win32Exception was unhandled" Message="Error creating window handle."...
6
by: Peter Frost | last post by:
Please help I don't know if this is possible but what I would really like to do is to use On Error Goto to capture the code that is being executed when an error occurs. Any help would be much...
0
by: Rhon Stewart via DotNetMonster.com | last post by:
Hi please visit this link : http://www.eggheadcafe.com/articles/pfc/selfupdater.asp I followed all the steps for listed on the link , when I execute the application it it gives me the following...
4
by: Larry Tate | last post by:
I am wanting to get those cool html error pages that ms produces when I hit an error in asp.net. For instance, when I get a compilation error I get an html error page that shows me the ...
1
by: Al | last post by:
hi , I am creating a form in asp.net and in the form, I crateed a couple of buttons, when I call a function I get the following error : Method 'Public Sub (function name) does not have the same...
2
by: tshad | last post by:
This has been driving me crazy. I have been trying to get the error handling working on my system and can get parts of it working and others won't work at all. I found that you can't access...
0
by: DC | last post by:
The problem I'm using the .NET GridView and FormView objects for the first time and im getting the error "An OleDbParameter with ParameterName '@ID' is not contained by this...
0
by: shahiz | last post by:
This the error i get when i try to run my program Error: Unable to realize com.sun.media.amovie.AMController@18b81e3 Basically i have a mediapanel class that initialize and play the media as...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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...
0
Oralloy
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,...
0
jinu1996
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...
0
tracyyun
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...
0
isladogs
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...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.