I have a function that I want to jump to from 2 different controls
(ImageButton and LinkButton).
The problem is I get the error:
Method 'Public Sub PrintPage_Click(sender As Object, e As
System.Web.UI.ImageClickEventArgs)' does not have the same signature as
delegate 'Delegate Sub EventHandler(sender As Object, e As System.EventArgs)
Is there a way to call the same function from these 2 buttons?
Thanks,
Tom 4 1284
Put all the logic that does the printing into its own function. Then call it
from both of the event handlers.
"tshad" <ts**********@ftsolutions.com> wrote in message
news:u%****************@TK2MSFTNGP05.phx.gbl... I have a function that I want to jump to from 2 different controls (ImageButton and LinkButton).
The problem is I get the error:
Method 'Public Sub PrintPage_Click(sender As Object, e As System.Web.UI.ImageClickEventArgs)' does not have the same signature as delegate 'Delegate Sub EventHandler(sender As Object, e As System.EventArgs)
Is there a way to call the same function from these 2 buttons?
Thanks,
Tom
That's what I thought.
I was hoping to do it from one function.
Thanks,
Tom
"Marina Levit [MVP]" <so*****@nospam.com> wrote in message
news:OC**************@TK2MSFTNGP05.phx.gbl... Put all the logic that does the printing into its own function. Then call it from both of the event handlers.
"tshad" <ts**********@ftsolutions.com> wrote in message news:u%****************@TK2MSFTNGP05.phx.gbl...I have a function that I want to jump to from 2 different controls (ImageButton and LinkButton).
The problem is I get the error:
Method 'Public Sub PrintPage_Click(sender As Object, e As System.Web.UI.ImageClickEventArgs)' does not have the same signature as delegate 'Delegate Sub EventHandler(sender As Object, e As System.EventArgs)
Is there a way to call the same function from these 2 buttons?
Thanks,
Tom
Why? Does it really matter?
You could change the PrintPage_Click method to have just EventArgs as the
second argument, which will be fine as long as you are not using any of the
information in the arguments you have now.
But in reality, it's not even worth doing. Creating another method is
trivial.
"tshad" <ts**********@ftsolutions.com> wrote in message
news:ek**************@TK2MSFTNGP04.phx.gbl... That's what I thought.
I was hoping to do it from one function.
Thanks,
Tom "Marina Levit [MVP]" <so*****@nospam.com> wrote in message news:OC**************@TK2MSFTNGP05.phx.gbl... Put all the logic that does the printing into its own function. Then call it from both of the event handlers.
"tshad" <ts**********@ftsolutions.com> wrote in message news:u%****************@TK2MSFTNGP05.phx.gbl...I have a function that I want to jump to from 2 different controls (ImageButton and LinkButton).
The problem is I get the error:
Method 'Public Sub PrintPage_Click(sender As Object, e As System.Web.UI.ImageClickEventArgs)' does not have the same signature as delegate 'Delegate Sub EventHandler(sender As Object, e As System.EventArgs)
Is there a way to call the same function from these 2 buttons?
Thanks,
Tom
It doesn't really, I was just curious if I could.
And you're right about creating another method.
Thanks,
Tom
"Marina Levit [MVP]" <so*****@nospam.com> wrote in message
news:ee**************@TK2MSFTNGP05.phx.gbl... Why? Does it really matter?
You could change the PrintPage_Click method to have just EventArgs as the second argument, which will be fine as long as you are not using any of the information in the arguments you have now.
But in reality, it's not even worth doing. Creating another method is trivial.
"tshad" <ts**********@ftsolutions.com> wrote in message news:ek**************@TK2MSFTNGP04.phx.gbl... That's what I thought.
I was hoping to do it from one function.
Thanks,
Tom "Marina Levit [MVP]" <so*****@nospam.com> wrote in message news:OC**************@TK2MSFTNGP05.phx.gbl... Put all the logic that does the printing into its own function. Then call it from both of the event handlers.
"tshad" <ts**********@ftsolutions.com> wrote in message news:u%****************@TK2MSFTNGP05.phx.gbl... I have a function that I want to jump to from 2 different controls (ImageButton and LinkButton).
The problem is I get the error:
Method 'Public Sub PrintPage_Click(sender As Object, e As System.Web.UI.ImageClickEventArgs)' does not have the same signature as delegate 'Delegate Sub EventHandler(sender As Object, e As System.EventArgs)
Is there a way to call the same function from these 2 buttons?
Thanks,
Tom
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: garyolsen |
last post by:
class base{
public:
void NonVirtualMethod(int a);
virtual void VirtualMethod(int a);
};
class derived{
public:
void NonVirtualMethod(int a, char c);
void VirtualMethod(int a, char c);
|
by: Alex Vinokur |
last post by:
Hi,
I need something like "function inheritance".
typedef void (*func_type1) (int);
typedef int (*func_type2) (double);
typedef char (*func_type3) (short, int);
....
I need a vector...
|
by: don |
last post by:
I have two existing interfaces having methods with same names. Now I have to
implement both intrfaces in one class. Is there any way I could implement
methods with same names in both interfaces...
|
by: Felix_Jiang |
last post by:
The following code returns different result when running on dotnetFramework
1.1 and 2.0. For 1.1, it returns "Object". For 2.0, it returns "String". Can
anyone explain to me why? Thanks!
...
|
by: John Friedland |
last post by:
My problem: I need to call (from C code) an arbitrary C library
function, but I don't know until runtime what the function name is,
how many parameters are required, and what the parameters are. I...
|
by: Zytan |
last post by:
MSDN says: "The ref and out keywords are treated differently at run-
time, but they are treated the same at compile time. Therefore methods
cannot be overloaded if one method takes a ref argument...
|
by: _mario.lat |
last post by:
hallo,
what does it means "the function is not thread-safe"?
thak you in advance,
Mario.
|
by: ashjas |
last post by:
Hello,
I have run this logic on turboc++ 3.0 and it is working fine on it but
its not running on msvs2008 c++.
i am not able to assign the value like this *temp=*main,where main and
temp are char...
|
by: MikeC |
last post by:
Folks,
I've been playing with C programs for 25 years (not professionally -
self-taught), and although I've used function pointers before, I've never
got my head around them enough to be able to...
|
by: MeoLessi9 |
last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
|
by: Aftab Ahmad |
last post by:
Hello Experts!
I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
|
by: Aftab Ahmad |
last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below.
Dim IE As Object
Set IE =...
|
by: ryjfgjl |
last post by:
ExcelToDatabase: batch import excel into database automatically...
|
by: marcoviolo |
last post by:
Dear all,
I would like to implement on my worksheet an vlookup dynamic , that consider a change of pivot excel via win32com, from an external excel (without open it) and save the new file into a...
|
by: Vimpel783 |
last post by:
Hello!
Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
|
by: jfyes |
last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
|
by: ArrayDB |
last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
|
by: PapaRatzi |
last post by:
Hello,
I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
| |