[VB.NET]Erreur Button Click
bonjour,
je débute dans l'ASP et je développe un nouveau logiciel de planning. J'ai donc créer un forulaire d'inscription avec les Textboxs et un bouton (tous ASP, aucun n'est HTML pur). Seulement le problème c'est que quand je cliques sur le Bouton Inscrire pour enregistrer les données dans ma base de données il me met qu'une exception System.Web.HttpException à été levée alors que je n'est rien de mauvais (enfin d'après moi)
Je vous joins ici le code du formulaire:
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54
|
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Inscription.aspx.vb" Inherits="Inscription" %>
<!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 runat="server">
<title>Inscription</title>
<link rel="stylesheet" media="screen" type="text/css" title="Design" href="./CSS.css" />
</head>
<body>
<form id="frmInscription" runat="server" action="Default.aspx?page=inscription">
<div id="contenu">
<table id="tblInscription" runat="server">
<tr>
<td colspan="2" class="TitreTBLInsc">Informations Utilisateur</td>
</tr>
<tr><td colspan="2" class="intercells"></td></tr>
<tr>
<td colspan="2">Matricule: <asp:TextBox ReadOnly="true" ID="txtIDMatricule" MaxLength="3" Columns="3" runat="server"></asp:TextBox><% Response.Write(Chr(32))%>Pseudonyme: <asp:TextBox ID="txtPseudo" MaxLength="10" runat="server"></asp:TextBox></td>
</tr>
<tr>
<td>Mot de Passe: <asp:TextBox TextMode="Password" ID="txtPassword" AutoCompleteType="None" AutoPostBack="false" runat="server"></asp:TextBox></td>
<td>Vérif. Mot de Passe: <asp:TextBox TextMode="Password" ID="txtVerifPassword" runat="server"></asp:TextBox></td>
</tr>
<tr><td colspan="2" class="intercells"></td></tr>
<tr>
<td colspan="2" class="TitreTBLInsc">Informations Personelles</td>
</tr>
<tr><td colspan="2" class="intercells"></td></tr>
<tr>
<td>Nom: <asp:TextBox ID="txtNom" runat="server"></asp:TextBox></td>
<td>Prénom: <asp:TextBox ID="txtPrenom" runat="server"></asp:TextBox></td>
</tr>
<tr>
<td>Téléphone: <asp:TextBox ID="txtTel" runat="server"></asp:TextBox></td>
<td>Autre Téléphone: <asp:TextBox ID="txtAureTel" runat="server"></asp:TextBox></td>
</tr>
<tr><td colspan="2" class="intercells"></td></tr>
<tr><td colspan="2" class="TitreTBLInsc">Statut</td></tr>
<tr><td colspan="2" class="intercells"></td></tr>
<tr>
<td colspan="2">
<asp:DropDownList ID="lstStatuts" runat="server">
<asp:ListItem Text="Employé" Value="1" Selected="True"></asp:ListItem>
<asp:ListItem Text="Administrateur" Value="0"></asp:ListItem>
</asp:DropDownList>
</td>
</tr>
<tr><td colspan="2" class="intercells"></td></tr>
<tr><td colspan="2" id="lgSubmit"><asp:Button ID="btnInscrire" Text="Inscrire" runat="server" /></td></tr>
</table>
</div>
</form>
</body>
</html> |
J'ai mis en gros un souci qui m'a frappé qu'en j'ai relu le Code Source que voici:
(Y'a d'autres Pages Inclues: Default.aspx (--> page principale) reçoit Insciption.aspx)
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
|
<!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><title>
Accueil
</title><link rel="stylesheet" media="screen" type="text/css" title="Design Index" href="./CSS.css" /></head>
...
<body>
<form name="default" method="post" action="Default.aspx?page=inscription" id="default">
...
<!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><title>
Inscription
</title><link rel="stylesheet" media="screen" type="text/css" title="Design" href="./CSS.css" /></head>
<body>
<form name="frmInscription" method="post" action="Inscription.aspx?page=inscription" id="frmInscription">
...
</form>
</body>
</html>
<div>
...
</div></form>
</body>
</html> |
Je n'arrive pas à savoir d'où il tient le "action" du <form>. Je ne sais pas si cela peut jouer dans l'erreur que j'ai.
Merci d'avance pour votre aide.;)