0

I am working on a contact page using asp. in the form I created the text boxes fine for Name, Address, Email etc etc.(Page displays fine up to this point) When I create the button code- it will not create an event or rather the test_form.aspx.cs

Here is my code. I was following a youTube channel to get this to work.

<form runat="server"> 
<asp:TextBox ID="Name" placeholder="Name:" runat="server" /> <br /> 
<asp:TextBox ID="SenderEmail" placeholder="Email:" runat="server" /> <br /> 
<asp:TextBox ID="SenderPhone" placeholder="Phone:" runat="server" /> <br /> 
<asp:TextBox ID="Subject" placeholder="Subject:" runat="server" /> <br /> 
<asp:TextBox ID="Message" placeholder="Message:" runat="server" TextMode="MultiLine" MaxLength="100" /> <br /> 
<asp:Button ID="Send" Text="Send Message" runat="server" OnClick="sendMessage_Click" /> <br />

</form>

ANd I get this error code when I run the page

Line 163:                                            <asp:TextBox ID="Message" placeholder="Message:" runat="server" TextMode="MultiLine" MaxLength="100" />
Line 164:                                            <br />
Line 165:                                            <asp:Button ID="Send" Text="Send Message" runat="server" OnClick="sendMessage_Click" />
Line 166:                                            <br />
Line 167:
Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
  • c:\Users\mcs\source\repos\Joe Libeu\Joe Libeu\Test Form.aspx(165,59): error This is the error message I receive.CS1061: 'ASP.test_form_aspx' does not contain a definition for 'sendMessage_Click' and no extension method 'sendMessage_Click' accepting a first argument of type 'ASP.test_form_aspx' could be found (are you missing a using directive or an assembly reference?) – mcsmelinda Jan 10 '20 at 23:25
  • 1
    Please [edit] the question to add more information. Prefix the line with "`>`" to quote error messages such as this. – madreflection Jan 10 '20 at 23:26
  • Here is my code






    – mcsmelinda Jan 10 '20 at 23:31
  • please: [edit] your question; put the code and the error in the question. not in the comments. its hard to read. – Stefan Jan 10 '20 at 23:33
  • @mcsmelinda: Your last comment duplicates the code in the question, which I fenced in my edit so that it appears correctly. It's not needed in the comments; you may delete that comment. Instead, please add the C# code to the question. It's missing a visible method called `sendMessage_Click`, possibly just because of a difference in the case of the name. – madreflection Jan 10 '20 at 23:40

0 Answers0