W
Wayne Wengert
I have an aspx page that was working (honest!). I was adding some features
and some validation code and all of a sudden I am getting the following
errors:
c:\inetpub\wwwroot\WBA_StaffControls\frmFindBand.aspx.vb(101): Handles
clause requires a WithEvents variable.
c:\inetpub\wwwroot\WBA_StaffControls\frmFindBand.aspx.vb(108): Name
'txtSearchFor' is not declared.
The relevant HTML code below shows that btnFind and txtSearchFor are both
IDs of controls. What the heck is going on?
====================================================
<asp:table id="Table1" style="Z-INDEX: 103; LEFT: 7px; POSITION: absolute;
TOP: 179px" tabIndex="-1"
runat="server" BorderWidth="0px" BorderStyle="None" BorderColor="Black"
Width="381px" Height="81px">
<asp:TableRow>
<asp:TableCell ColumnSpan="1" HorizontalAlign="Center">Last Name to
Search For:
<asp:TextBox runat="server" Height="20px" Width="139px"
ID="txtSearchFor" style="Z-INDEX: POSITION: relative;"></asp:TextBox>
</asp:TableCell>
</asp:TableRow>
<asp:TableRow>
<asp:TableCell HorizontalAlign="Center">
<asp:Button runat="server" Width="66px" ID="btnFind" Height="22px"
Text="Find" style="Z-INDEX: 105; POSITION: relative; "></asp:Button>
</asp:TableCell>
</asp:TableRow>
</asp:table>
and some validation code and all of a sudden I am getting the following
errors:
c:\inetpub\wwwroot\WBA_StaffControls\frmFindBand.aspx.vb(101): Handles
clause requires a WithEvents variable.
c:\inetpub\wwwroot\WBA_StaffControls\frmFindBand.aspx.vb(108): Name
'txtSearchFor' is not declared.
The relevant HTML code below shows that btnFind and txtSearchFor are both
IDs of controls. What the heck is going on?
====================================================
<asp:table id="Table1" style="Z-INDEX: 103; LEFT: 7px; POSITION: absolute;
TOP: 179px" tabIndex="-1"
runat="server" BorderWidth="0px" BorderStyle="None" BorderColor="Black"
Width="381px" Height="81px">
<asp:TableRow>
<asp:TableCell ColumnSpan="1" HorizontalAlign="Center">Last Name to
Search For:
<asp:TextBox runat="server" Height="20px" Width="139px"
ID="txtSearchFor" style="Z-INDEX: POSITION: relative;"></asp:TextBox>
</asp:TableCell>
</asp:TableRow>
<asp:TableRow>
<asp:TableCell HorizontalAlign="Center">
<asp:Button runat="server" Width="66px" ID="btnFind" Height="22px"
Text="Find" style="Z-INDEX: 105; POSITION: relative; "></asp:Button>
</asp:TableCell>
</asp:TableRow>
</asp:table>