VB.NET button click event not fired in any added new button

C

Coo Coo

Hi all,
Working on VS in VB.NET in some pages which where all fine before, I
can't add a button of any kind and get the click event fired. I
already checked that there is an event handler (Tried both in the html
and the code behind)
When I debug I can see that the page does not even go to the event
handler. I checked all the button events and it seems that the
following are fired on page load: Init, Load and unload.
When I click the button itself nothing happens.
Any Idea?
Here is the code with necessary abbreviations:
Thanks for any reply,
Toro.

ASPX code:
<%@ Page Language="vb" CodeBehind="help.aspx.vb"
AutoEventWireup="false" Inherits="IBuySpy.help" %>
<%@ Register TagPrefix="IBuySpy" TagName="Header" Src="_Header.ascx"
%>
<%@ Register TagPrefix="IBuySpy" TagName="Menu" Src="_Menu.ascx" %>
<HTML dir="rtl">
<HEAD>
<title></title>
<meta content="False" name="vs_showGrid">
<LINK href="IBuySpy.css" type="text/css" rel="stylesheet">
</HEAD>

<body>
<P><FONT face="Arial">
<asp:Button id="EncryptButton" runat="server"
Text="Encrypt" OnClick="EncryptButton_Click"></asp:Button>
<asp:Button id="DecryptButton" runat="server"
Text="Decrypt"></asp:Button><BR>
<FONT size="2"></FONT></FONT>
</P>

CODE BEHIND

Public Class help
Inherits System.Web.UI.Page
Protected WithEvents Image1 As System.Web.UI.WebControls.Image
Protected WithEvents EncryptButton As
System.Web.UI.WebControls.Button
Protected WithEvents DecryptButton As
System.Web.UI.WebControls.Button
Protected WithEvents WelcomeMsg As System.Web.UI.WebControls.Label
#Region " Web Form Designer Generated Code "
'This call is required by the Web Form Designer.
<System.Diagnostics.DebuggerStepThrough()> Private Sub
InitializeComponent()
End Sub

Private Sub Page_Init(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Init
'CODEGEN: This method call is required by the Web Form
Designer
'Do not modify it using the code editor.
InitializeComponent()
End Sub
#End Region


Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
Some code here......
End Sub

Public Sub EncryptButton_Click(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles EncryptButton.Click
Some code here......
End Sub
End Class
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,564
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top