Contact Form ASP.net

Posted by kwek-kwek on Stack Overflow See other posts from Stack Overflow or by kwek-kwek
Published on 2010-03-25T16:08:29Z Indexed on 2010/03/25 16:13 UTC
Read the original article Hit count: 609

Filed under:
|

This is my first time creating a from in ASP.NET I am following a tutorial here

It is easy to follow but I get this error.

But, if I take out this code :

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="contact-form.aspx.cs" Inherits="_Emailer" %>

it works like a charm. What am I doing wrong?

Here is my code full HTML:

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="contact-form.aspx.cs" Inherits="_Emailer" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1 " />
<title>&Eacute;cole Marc Favreau</title>
<link href="style.css" rel="stylesheet" type="text/css" />

</head>

<body id="benevolat">
<asp:label id="lblOutcome" runat="server" />
<form action="" method="post" enctype="multipart/form-data" name="form1" id="form1">
   <table width="100%" border="0" cellspacing="5" cellpadding="0">
      <tr>
         <td>Nom du Parent</td>
         <td><label>
            <input type="text" name="c_Name" id="c_Name" />
         </label></td>
      </tr>
      <tr>
         <td>Nom de votre enfant</td>
         <td><input type="text" name="c_Enfant" id="c_Enfant" /></td>
      </tr>
      <tr>
         <td>Groupe</td>
         <td><input type="text" name="c_Groupe" id="c_Groupe" /></td>
      </tr>
      <tr>
         <td>Num&eacute;ro de t&eacute;l&eacute;phone</td>
         <td><input type="text" name="c_Tel" id="c_Tel" /></td>
      </tr>
      <tr>
         <td>&nbsp;</td>
         <td>&nbsp;</td>
      </tr>
      <tr>
         <td colspan="2"><strong>J'aimerais &ecirc;tre bénévole pour:</strong></td>
         </tr>
      <tr>
         <td colspan="2"><table width="100%" border="0" cellspacing="5" cellpadding="0">
            <tr>
               <td width="5%"><label>
                  <input type="checkbox" name="La biblioth&egrave;que " id="La biblioth&egrave;que " />
               </label></td>
               <td colspan="2">La biblioth&egrave;que </td>
            </tr>
            <tr>
               <td><input type="checkbox" name="Aide en classe " id="Aide en classe " /></td>
               <td colspan="2">Aide en classe </td>
            </tr>
            <tr>
               <td><input type="checkbox" name="Aide pour les dîners pizza  " id="Aide pour les dîners pizza  " /></td>
               <td colspan="2">Aide pour les d&icirc;ners pizza&nbsp; </td>
            </tr>
            <tr>
               <td><input type="checkbox" name="Aide aux devoirs apr&egrave;s l&rsquo;&eacute;cole" id="Aide aux devoirs apr&egrave;s l&rsquo;&eacute;cole" /></td>
               <td colspan="2">Aide aux devoirs apr&egrave;s l&rsquo;&eacute;cole </td>
            </tr>
            <tr>
               <td><input type="checkbox" name="Am&eacute;nagement paysager (fleurs, arbustes &agrave; tailler&hellip;)" id="Am&eacute;nagement paysager (fleurs, arbustes &agrave; tailler&hellip;)" /></td>
               <td colspan="2">Am&eacute;nagement paysager (fleurs, arbustes &agrave; tailler&hellip;) </td>
            </tr>
            <tr>
               <td><input type="checkbox" name="Photo scolaire" id="Photo scolaire" /></td>
               <td colspan="2">Photo scolaire </td>
            </tr>
            <tr>
               <td><input type="checkbox" name="Accompagner les &eacute;l&egrave;ves lors des sorties" id="Accompagner les &eacute;l&egrave;ves lors des sorties" /></td>
               <td colspan="2">Accompagner les &eacute;l&egrave;ves lors des sorties </td>
            </tr>
            <tr>
               <td><input type="checkbox" name="Venir parler de votre m&eacute;tier dans une classe ou monter un atelier" id="Venir parler de votre m&eacute;tier dans une classe ou monter un atelier" /></td>
               <td colspan="2">Venir parler de votre m&eacute;tier dans une classe ou monter un atelier </td>
            </tr>
            <tr>
               <td><input type="checkbox" name="Autres" id="Autres" /></td>
               <td>Autres</td>
               <td><label>
                  <input type="text" name="c_Autre" id="c_Autre" />
               </label></td>
            </tr>
         </table></td>
         </tr>
      <tr>
         <td colspan="2"><label>
            <input type="submit" name="button" id="button" value="Soumettre" />
            <input type="submit" name="button2" id="button2" value="Effacer" />
         </label></td>
      </tr>
   </table>
</form>
</div>

</div>

</div>
<!-- #include file="footer.aspx"-->

</div>
</body>
</html>

© Stack Overflow or respective owner

Related posts about ASP.NET

Related posts about forms