i am trying to write some code behind a webpage to send an email onClick of a button.
i have a text box
<asp:TextBox ID="txtSecEmail" runat="server" Width="189px"
ontextchanged="txtSecEmail_TextChanged"></asp:TextBox>
i also have a button after that
<asp:Button ID="btnUploadFiles" runat="server" Text="Upload Files"
Command="Command"
CommandArgument="CommandArgument"
runat="server" onclick="btnUploadFiles_Click" />
when i try to load the page i get this error
Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: BC30456: ‘txtSecEmail_TextChanged’ is not a member of ‘ASP.datauploaddatafiles_aspx’.
Source Error:
Line 94: <td>
Line 95: EMAIL ADDRESS:
Line 96: <asp:TextBox ID="txtSecEmail" runat="server" Width="189px"
Line 97: ontextchanged="txtSecEmail_TextChanged"></asp:TextBox>
Line 98: </td>
Source File: Y:\Prog\NET\web\ClientCenterNew\datauploaddatafiles.aspx Line: 96
i dont understand how it is not a member? and why its saying this?
It is looking for the txtSecEmail_TextChanged method in the codebehind (datauploaddatafiles.aspx.vb). Put that sub routine in the code behind file and rebuild.
Example: