B
Bob
Hi,
In code - behind, i wrote this code:
Sub serverklik()
Response.Write("serverklik")
End Sub
In aspx file, i defined this:
<asp:Button ID="Button3" runat="server" Text="Button" OnClick="serverklik"
/>
I get the error:
Method 'Public Sub serverklik()' does not have the same signature as
delegate 'Delegate Sub EventHandler(sender As Object, e As
System.EventArgs)'.
I know that i can do this in code-behind: (this works)
Protected Sub Button3_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Button3.Click
Response.Write("serverklik")
End Sub
but my question is:
it must be possible to use the OnClick event in the aspx file that refers to
a procedure in code-behind.
How?
Thanks
Bob
In code - behind, i wrote this code:
Sub serverklik()
Response.Write("serverklik")
End Sub
In aspx file, i defined this:
<asp:Button ID="Button3" runat="server" Text="Button" OnClick="serverklik"
/>
I get the error:
Method 'Public Sub serverklik()' does not have the same signature as
delegate 'Delegate Sub EventHandler(sender As Object, e As
System.EventArgs)'.
I know that i can do this in code-behind: (this works)
Protected Sub Button3_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Button3.Click
Response.Write("serverklik")
End Sub
but my question is:
it must be possible to use the OnClick event in the aspx file that refers to
a procedure in code-behind.
How?
Thanks
Bob