Quantcast
Channel: CSharp Forum Latest Questions
Viewing all articles
Browse latest Browse all 32057

Login form with validation using Devexpress

$
0
0
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>

Viewing all articles
Browse latest Browse all 32057

Trending Articles