hondaman2003
Programmer
I have a login control with a layout template. I have read that AJAX should work with a partial page update but mine is not working. It does a full postback.
Here is my code:
Here is my code:
Code:
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:LoginView ID="LoginView1" runat="server">
<AnonymousTemplate>
<asp:Login ID="Login1" runat="server" Width="200px" >
<LayoutTemplate>
<asp:Label ID="Label1" runat="server" AssociatedControlID="UserName">User Name:</asp:Label><br />
<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="ctl00$ctl01$Login1" EnableClientScript="False">*</asp:RequiredFieldValidator><br />
<asp:Label ID="PasswordLabel" runat="server" AssociatedControlID="Password">Password:</asp:Label><br />
<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="ctl00$ctl01$Login1" EnableClientScript="False">*</asp:RequiredFieldValidator><br />
<asp:CheckBox ID="RememberMe" runat="server" Text="Remember me next time." /><br />
<asp:Literal ID="FailureText" runat="server" EnableViewState="False"></asp:Literal><br />
<asp:Button ID="LoginButton" runat="server" CommandName="Login" Text="Log In" ValidationGroup="ctl00$ctl01$Login1" />
</LayoutTemplate>
</asp:Login>
</AnonymousTemplate>
<LoggedInTemplate>
Welcome <asp:LoginName ID="LoginName1" runat="server" Font-Bold="True" /><br /><br />
Add Photos<br />
<asp:LoginStatus ID="LoginStatus1" runat="server" />
</LoggedInTemplate>
</asp:LoginView>
</ContentTemplate>
</asp:UpdatePanel>