Hi,
I'm trying to do a login page starting from you demo sample.
The client side validation is not working, it runs only server side causing a tedious postback.
I simply copied your code demo.
Am I missing something?
This is my code:
The code behind is empty.
Any suggestion will be grateful!
Thank you so much ;)
I'm trying to do a login page starting from you demo sample.
The client side validation is not working, it runs only server side causing a tedious postback.
I simply copied your code demo.
Am I missing something?
This is my code:
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Login.aspx.cs" Inherits="Namespace.Login" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<!DOCTYPE html>
<
html
xmlns
=
"http://www.w3.org/1999/xhtml"
>
<
head
runat
=
"server"
>
<
meta
http-equiv
=
"Content-Type"
content
=
"text/html; charset=utf-8"
/>
<
title
>Login</
title
>
<
link
href
=
"Content/Styles/login.css"
rel
=
"stylesheet"
/>
</
head
>
<
body
>
<
form
id
=
"formLogin"
runat
=
"server"
>
<
telerik:RadScriptManager
ID
=
"RadScriptManager1"
runat
=
"server"
></
telerik:RadScriptManager
>
<
div
id
=
"rfd-demo-zone"
>
<
div
class
=
"vlaidationSummary"
>
<
telerik:RadAjaxPanel
ID
=
"RadAjaxPanel1"
runat
=
"server"
LoadingPanelID
=
"RadAjaxLoadingPanel1"
>
<
telerik:RadFormDecorator
ID
=
"RadFormDecorator1"
runat
=
"server"
DecoratedControls
=
"All"
DecorationZoneID
=
"rfd-demo-zone"
/>
<
telerik:RadAjaxLoadingPanel
ID
=
"RadAjaxLoadingPanel1"
runat
=
"server"
Skin
=
"Default"
></
telerik:RadAjaxLoadingPanel
>
<
div
class
=
"groupWrapper"
>
<
asp:Login
ID
=
"Login1"
runat
=
"server"
Width
=
"100%"
EnableViewState
=
"false"
OnLoggingIn
=
"Login1_LoggingIn"
>
<
LayoutTemplate
>
<
table
cellpadding
=
"1"
cellspacing
=
"0"
width
=
"100%"
>
<
tr
>
<
td
>
<
table
cellpadding
=
"0"
width
=
"100%"
>
<
tr
>
<
td
>
<
asp:Label
ID
=
"UserNameLabel"
runat
=
"server"
AssociatedControlID
=
"UserName"
>Username:</
asp:Label
>
</
td
>
<
td
>
<
asp:TextBox
ID
=
"UserName"
runat
=
"server"
></
asp:TextBox
>
<
asp:RequiredFieldValidator
ID
=
"UserNameRequired"
runat
=
"server"
ControlToValidate
=
"UserName"
ErrorMessage
=
"Required"
ToolTip
=
"Required"
ValidationGroup
=
"Login1"
></
asp:RequiredFieldValidator
>
</
td
>
</
tr
>
<
tr
>
<
td
>
<
asp:Label
ID
=
"PasswordLabel"
runat
=
"server"
AssociatedControlID
=
"Password"
>Password:</
asp:Label
>
</
td
>
<
td
>
<
asp:TextBox
ID
=
"Password"
runat
=
"server"
TextMode
=
"Password"
Text
=
"caffe"
></
asp:TextBox
>
<
asp:RequiredFieldValidator
ID
=
"PasswordRequired"
runat
=
"server"
ControlToValidate
=
"Password"
ErrorMessage
=
"Required"
ToolTip
=
"Required"
ValidationGroup
=
"Login1"
></
asp:RequiredFieldValidator
>
</
td
>
</
tr
>
<
tr
>
<
td
>
</
td
>
<
td
>
<
asp:CheckBox
ID
=
"RememberMe"
runat
=
"server"
Text
=
"Remember"
></
asp:CheckBox
>
</
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
colspan
=
"2"
style
=
"text-align: right;"
>
<
asp:Button
ID
=
"LoginButton"
runat
=
"server"
CommandName
=
"Login"
Text
=
"Log In"
ValidationGroup
=
"Login1"
></
asp:Button
>
</
td
>
</
tr
>
</
table
>
</
td
>
</
tr
>
</
table
>
</
LayoutTemplate
>
</
asp:Login
>
<
asp:Label
ID
=
"lblRisultato"
Text
=
""
Font-Size
=
"Large"
ForeColor
=
"Green"
runat
=
"server"
></
asp:Label
>
<
div
style
=
"margin-top: 5px;"
>
<
asp:LoginName
ID
=
"LoginName1"
runat
=
"server"
Width
=
"300px"
EnableViewState
=
"false"
></
asp:LoginName
>
</
div
>
<
div
style
=
"margin-top: 5px;"
>
<
asp:LoginStatus
ID
=
"LoginStatus1"
runat
=
"server"
Width
=
"300px"
EnableViewState
=
"false"
></
asp:LoginStatus
>
</
div
>
<
div
style
=
"margin-top: 5px;"
>
<
asp:LoginView
ID
=
"LoginView1"
runat
=
"server"
EnableViewState
=
"false"
>
<
AnonymousTemplate
>
<
div
style
=
"height: 100px"
>
This is displayed if the user is NOT logged in!
</
div
>
</
AnonymousTemplate
>
<
LoggedInTemplate
>
<
div
style
=
"color: #fff; background-color: #015914; -moz-border-radius: 4px; padding: 4px;"
>
This is displayed if the user is LOGGED in!
</
div
>
</
LoggedInTemplate
>
</
asp:LoginView
>
</
div
>
</
div
>
</
telerik:RadAjaxPanel
>
</
div
>
</
div
>
</
form
>
</
body
>
</
html
>
Any suggestion will be grateful!
Thank you so much ;)