nothing else

nothing else

  • NA
  • 28
  • 32.1k

Login form with validation using Devexpress

Apr 3 2013 10:06 AM
Now i have situation that i want create a login form with validation. When user leave empty string and click submit, validation popup will be showed. Otherwise, if user enter wrong username or password, validation popup also will be showed. Please help me, thank advance!

<table border="0">
<tr>
<td class="auto-style1">
<p class="contact-form-sender">
<dx:ASPxTextBox ID="txtUserName" runat="server">
<ValidationSettings Display="None">
<RequiredField IsRequired="true" ErrorText="Xin nha?^p te^n da?ng nha?^p" />
</ValidationSettings>
<ClientSideEvents Validation="OnValidation" GotFocus="OnGotFocus" />
</dx:ASPxTextBox>
</p>
</td>
</tr>
<tr>
<td class="auto-style1">
<p class="contact-form-sender">
<dx:ASPxTextBox Password="true" ID="txtPassword" runat="server">
<ValidationSettings Display="None">
<RequiredField IsRequired="true" ErrorText="Xin nha?^p ma?^t kha^?u" />
</ValidationSettings>
<ClientSideEvents Validation="OnValidation" GotFocus="OnGotFocus" />
</dx:ASPxTextBox>
</p>
</td>
</tr>
<tr>
<td>
<asp:CheckBox ID="ckRemberLogin" Font-Size="15px" runat="server" Text=" Ghi nho?´ da?ng nha?^p"/>
<br /><br />
<span class="button-met dark">
<dx:ASPxButton ID="btnLogin" runat="server" Text="Te^n da?ng nha?^p" CssClass="button" ValidationGroup="OnValidation" OnClick="btnLogin_Click">
</dx:ASPxButton>
</span>
<span class="button-met dark">
<asp:LinkButton ID="btnSignUp"
CssClass="button" Text="Ða?ng ky´"
runat="server" BorderWidth="0px" PostBackUrl="~/Dang-Ky.aspx" CausesValidation="False" ValidationGroup="dangnhap"/>
</span>
<asp:Label ID="lblThongBao" Font-Size="18px" ForeColor="#68C6D1" runat="server" />
</td>
</tr>
</table>