IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

ASP.NET Discussion :

le contrôle Login asp.net visual studio 2005


Sujet :

ASP.NET

  1. #1
    Futur Membre du Club
    Profil pro
    Inscrit en
    Juillet 2008
    Messages
    6
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juillet 2008
    Messages : 6
    Points : 5
    Points
    5
    Par défaut le contrôle Login asp.net visual studio 2005
    Bonjour, je suis l'atelier 5 de MSDN coach asp .net. Je suis à l'étape pour créer une page d'authentification. Pour ça, j'ai utiliser le contrôle Login. Mais quand j'ai lancé la page il y a une messege qui affiche:
    Server Error in '/affairesansrisque' Application.
    --------------------------------------------------------------------------------

    Login1: LayoutTemplate does not contain an IEditableTextControl with ID UserName for the username.
    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.Web.HttpException: Login1: LayoutTemplate does not contain an IEditableTextControl with ID UserName for the username.

    Source Error:

    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

    Stack Trace:


    [HttpException (0x80004005): Login1: LayoutTemplate does not contain an IEditableTextControl with ID UserName for the username.]
    System.Web.UI.WebControls.GenericContainer`1.FindControl(String id, Boolean required, String errorResourceKey) +279
    System.Web.UI.WebControls.GenericContainer`1.FindRequiredControl(String id, String errorResourceKey) +77
    System.Web.UI.WebControls.LoginContainer.get_UserNameTextBox() +60
    System.Web.UI.WebControls.Login.get_UserNameInternal() +67
    System.Web.UI.WebControls.Login.SetEditableChildProperties() +58
    System.Web.UI.WebControls.Login.CreateChildControls() +220
    System.Web.UI.Control.EnsureChildControls() +134
    System.Web.UI.Control.PreRenderRecursiveInternal() +109
    System.Web.UI.Control.PreRenderRecursiveInternal() +233
    System.Web.UI.Control.PreRenderRecursiveInternal() +233
    System.Web.UI.Control.PreRenderRecursiveInternal() +233
    System.Web.UI.Control.PreRenderRecursiveInternal() +233
    System.Web.UI.Control.PreRenderRecursiveInternal() +233
    System.Web.UI.Control.PreRenderRecursiveInternal() +233
    System.Web.UI.Control.PreRenderRecursiveInternal() +233
    System.Web.UI.Control.PreRenderRecursiveInternal() +233
    System.Web.UI.Control.PreRenderRecursiveInternal() +233
    System.Web.UI.Control.PreRenderRecursiveInternal() +233
    System.Web.UI.Control.PreRenderRecursiveInternal() +233
    System.Web.UI.Control.PreRenderRecursiveInternal() +233
    System.Web.UI.Control.PreRenderRecursiveInternal() +233
    System.Web.UI.Control.PreRenderRecursiveInternal() +233
    System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +4437




    --------------------------------------------------------------------------------
    Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.42

    Je sais pas pkoi?
    Voilà le code:

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    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
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    180
    181
    182
    183
    184
    185
    186
    187
    188
    189
    190
    191
    192
    193
     
    <%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="Login.aspx.cs" Inherits="Login" Title="Untitled Page" %>
    <asp:Content ID="Content1" ContentPlaceHolderID="Main" Runat="Server">
        <br /> 
        <asp:Login ID="Login2" runat="server">
            <LayoutTemplate>
                <table border="0" cellpadding="1" cellspacing="0" style="border-collapse: collapse">
                    <tr>
                        <td align="left" colspan="2">
                        <h1>Vous êtes déjà membre :</h1>
                        <h2> Saisissez vos paramètres d'accès.</h2>
                        </td>
                        <td>
                            <table border="0" cellpadding="0">
                                <tr>
                                    <td align="center" colspan="2">
                                        Log In</td>
                                </tr>
                                <tr>
                                    <td align="right">
                                        <asp:Label ID="UserNameLabel" runat="server" AssociatedControlID="UserName">User Name:</asp:Label></td>
                                    <td>
                                        <asp:TextBox ID="UserName" runat="server"></asp:TextBox>
                                        <asp:RequiredFieldValidator ID="UserNameRequired" runat="server" ControlToValidate="UserName"
                                            ErrorMessage="User Name is required." ToolTip="User Name is required." ValidationGroup="Login2">*</asp:RequiredFieldValidator>
                                    </td>
                                </tr>
                                <tr>
                                    <td align="right">
                                        <asp:Label ID="PasswordLabel" runat="server" AssociatedControlID="Password">Password:</asp:Label>
                                    </td>
                                    <td>
                                        <asp:TextBox ID="Password" runat="server" TextMode="Password"></asp:TextBox>
                                        <asp:RequiredFieldValidator ID="PasswordRequired" runat="server" ControlToValidate="Password"
                                            ErrorMessage="Password is required." ToolTip="Password is required." ValidationGroup="Login2">*</asp:RequiredFieldValidator>
                                    </td>
                                </tr>
                                <tr>
                                    <td colspan="2">
                                        <asp:CheckBox ID="RememberMe" runat="server" Text="Remember me next time." />
                                    </td>
                                </tr>
                                <tr>
                                    <td align="center" colspan="2" style="color: red">
                                        <asp:Literal ID="FailureText" runat="server" EnableViewState="False"></asp:Literal>
                                    </td>
                                </tr>
                                <tr>
                                    <td align="right" colspan="2">
                                        <asp:Button ID="LoginButton" runat="server" CommandName="Login" Text="Log In" ValidationGroup="Login2" />
                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                </table>
            </LayoutTemplate>
        </asp:Login>
        <br />
        <br />
        <br />
        <br />
        &nbsp;
        <hr />
        <asp:CreateUserWizard ID="CreateUserWizard1" runat="server" BackColor="#EFF3FB" BorderColor="#B5C7DE" BorderStyle="Solid" BorderWidth="1px" CompleteSuccessText="Votre compte a été créé correctement" ContinueDestinationPageUrl="~/Default.aspx" Font-Names="Verdana" Font-Size="0.8em" Height="613px">
            <WizardSteps>
                <asp:CreateUserWizardStep runat="server">
                    <ContentTemplate>
                        <asp:Login ID="Login1" runat="server">
                            <LayoutTemplate>
                                <table border="0" cellpadding="1" cellspacing="0" style="border-collapse: collapse">
                                    <tr>
                                        <td style="width: 3px; height: 144px">
                                        </td>
                                    </tr>
                                </table>
                            </LayoutTemplate>
                        </asp:Login>
                        <table border="0">
                            <tr>
                           <td align="left" colspan="2">
                 <h1>Vous souhaitez devenir membre de notre espace annonces en ligne :</h1>
                 <h2>Créez votre compte. Tous les champs suivants sont obligatoires pour la création de 
                          votre espace personnel.</h2>
    </td>
                            </tr>
                            <tr>
                                <td align="right">
                                    <asp:Label ID="UserNameLabel" runat="server" AssociatedControlID="UserName"><h3>Nom d'utilisateur:</h3></asp:Label></td>
                                <td>
                                    <asp:TextBox ID="UserName" runat="server"></asp:TextBox>
                                    <asp:RequiredFieldValidator ID="UserNameRequired" runat="server" ControlToValidate="UserName"
                                        ErrorMessage="User Name is required." ToolTip="User Name is required." ValidationGroup="CreateUserWizard1">*</asp:RequiredFieldValidator>
                                </td>
                            </tr>
                            <tr>
                                <td align="right">
                                    <asp:Label ID="PasswordLabel" runat="server" AssociatedControlID="Password"><h3>Mot de passe:</h3></asp:Label></td>
                                <td>
                                    <asp:TextBox ID="Password" runat="server" TextMode="Password"></asp:TextBox>
                                    <asp:RequiredFieldValidator ID="PasswordRequired" runat="server" ControlToValidate="Password"
                                        ErrorMessage="Password is required." ToolTip="Password is required." ValidationGroup="CreateUserWizard1">*</asp:RequiredFieldValidator>
                                </td>
                            </tr>
                            <tr>
                                <td align="right">
                                    <asp:Label ID="ConfirmPasswordLabel" runat="server" AssociatedControlID="ConfirmPassword"><h3>Confirmation votre mot de passe:</h3></asp:Label></td>
                                <td>
                                    <asp:TextBox ID="ConfirmPassword" runat="server" TextMode="Password"></asp:TextBox>
                                    <asp:RequiredFieldValidator ID="ConfirmPasswordRequired" runat="server" ControlToValidate="ConfirmPassword"
                                        ErrorMessage="Confirm Password is required." ToolTip="Confirm Password is required."
                                        ValidationGroup="CreateUserWizard1">*</asp:RequiredFieldValidator>
                                </td>
                            </tr>
                            <tr>
                                <td align="right">
                                    <asp:Label ID="EmailLabel" runat="server" AssociatedControlID="Email"><h3>E-mail:</h3></asp:Label></td>
                                <td>
                                    <asp:TextBox ID="Email" runat="server"></asp:TextBox>
                                    <asp:RequiredFieldValidator ID="EmailRequired" runat="server" ControlToValidate="Email"
                                        ErrorMessage="E-mail is required." ToolTip="E-mail is required." ValidationGroup="CreateUserWizard1">*</asp:RequiredFieldValidator>
                                </td>
                            </tr>
                            <tr>
                                <td align="right">
                                    <asp:Label ID="QuestionLabel" runat="server" AssociatedControlID="Question"><h3>Question de sécurité:</h3></asp:Label></td>
                                <td>
                                    <asp:TextBox ID="Question" runat="server"></asp:TextBox>
                                    <asp:RequiredFieldValidator ID="QuestionRequired" runat="server" ControlToValidate="Question"
                                        ErrorMessage="Security question is required." ToolTip="Security question is required."
                                        ValidationGroup="CreateUserWizard1">*</asp:RequiredFieldValidator>
                                </td>
                            </tr>
                            <tr>
                                <td align="right">
                                    <asp:Label ID="AnswerLabel" runat="server" AssociatedControlID="Answer"><h3>Réponse de sécurité:</h3></asp:Label></td>
                                <td>
                                    <asp:TextBox ID="Answer" runat="server"></asp:TextBox>
                                    <asp:RequiredFieldValidator ID="AnswerRequired" runat="server" ControlToValidate="Answer"
                                        ErrorMessage="Security answer is required." ToolTip="Security answer is required."
                                        ValidationGroup="CreateUserWizard1">*</asp:RequiredFieldValidator>
                                </td>
                            </tr>
                            <tr>
                                <td align="center" colspan="2" style="height: 21px">
                                    <asp:CompareValidator ID="PasswordCompare" runat="server" ControlToCompare="Password"
                                        ControlToValidate="ConfirmPassword" Display="Dynamic" ErrorMessage="The Password and Confirmation Password must match."
                                        ValidationGroup="CreateUserWizard1">Le mot de passe et le mot de passe de confirmation doivent être correspondant</asp:CompareValidator>
                                </td>
                            </tr>
                            <tr>
                                <td align="center" colspan="2" style="color: red">
                                    <asp:Literal ID="ErrorMessage" runat="server" EnableViewState="False"></asp:Literal>
                                </td>
                            </tr>
                        </table>
                    </ContentTemplate>
                </asp:CreateUserWizardStep>            
                <asp:CompleteWizardStep runat="server">
                <ContentTemplate>
                <table border="0">
                <tr>
                <td align="left" colspan="2">
                <h3>Votre compte a été créé avec succès.
                Vous pouvez vous connecter maintenant.
                </h3>
                </td>
                </tr>
                </table>
                </ContentTemplate>
                </asp:CompleteWizardStep>
            </WizardSteps>
            <SideBarStyle BackColor="#507CD1" Font-Size="0.9em" VerticalAlign="Top" />
            <TitleTextStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
            <SideBarButtonStyle ForeColor="White" BackColor="#507CD1" Font-Names="Verdana" />
            <NavigationButtonStyle BackColor="White" BorderColor="#507CD1" BorderStyle="Solid"
                BorderWidth="1px" Font-Names="Verdana" ForeColor="#284E98" />
            <HeaderStyle BackColor="#284E98" BorderColor="#EFF3FB" BorderStyle="Solid" BorderWidth="2px"
                Font-Bold="True" Font-Size="0.9em" ForeColor="White" HorizontalAlign="Center" />
            <CreateUserButtonStyle BackColor="White" BorderColor="#507CD1" BorderStyle="Solid"
                BorderWidth="1px" Font-Names="Verdana" ForeColor="#284E98" />
            <ContinueButtonStyle BackColor="White" BorderColor="#507CD1" BorderStyle="Solid"
                BorderWidth="1px" Font-Names="Verdana" ForeColor="#284E98" />
            <StepStyle Font-Size="0.8em" />
        </asp:CreateUserWizard>
        <br />    
        <br />
        <br />
        <br />
        <span style="font-size: 10pt; font-family: 'Arial','sans-serif'; mso-bidi-font-size: 12.0pt;
            mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman';
            mso-ansi-language: FR; mso-fareast-language: FR; mso-bidi-language: AR-SA"></span>
    </asp:Content>
    Est ce que qq1 peut m'aider?

  2. #2
    Expert éminent sénior
    Avatar de Skyounet
    Homme Profil pro
    Software Engineer
    Inscrit en
    Mars 2005
    Messages
    6 380
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 37
    Localisation : Etats-Unis

    Informations professionnelles :
    Activité : Software Engineer
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Mars 2005
    Messages : 6 380
    Points : 13 380
    Points
    13 380
    Par défaut
    Pourquoi y'a un contrôle Login dans ton CreateUserWizard ?

Discussions similaires

  1. procedure stockée et asp.net(visual studio 2005)
    Par SALIA LOUA OLIVIER dans le forum ASP.NET
    Réponses: 1
    Dernier message: 23/09/2009, 12h41
  2. Application ASp.net visual studio 2005
    Par raf84 dans le forum ASP.NET
    Réponses: 5
    Dernier message: 17/05/2009, 18h37
  3. Deploiment application ASP.NET Visual studio 2005
    Par WELCOMSMAIL dans le forum ASP.NET
    Réponses: 3
    Dernier message: 03/06/2008, 11h55
  4. Réponses: 2
    Dernier message: 16/11/2006, 17h38
  5. ASP sur visual studio 2005
    Par smtjv dans le forum Visual Studio
    Réponses: 1
    Dernier message: 31/10/2006, 17h30

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo