本文整理汇总了C#中DataValue.GetEmailAddressFormItem方法的典型用法代码示例。如果您正苦于以下问题:C# DataValue.GetEmailAddressFormItem方法的具体用法?C# DataValue.GetEmailAddressFormItem怎么用?C# DataValue.GetEmailAddressFormItem使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DataValue
的用法示例。
在下文中一共展示了DataValue.GetEmailAddressFormItem方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: loadData
protected override void loadData()
{
var logInPb =
PostBack.CreateFull(
actionGetter:
() =>
new PostBackAction( user.MustChangePassword ? ChangePassword.Page.GetInfo( info.ReturnUrl ) as ResourceInfo : new ExternalResourceInfo( info.ReturnUrl ) ) );
var newPasswordPb = PostBack.CreateFull( id: "newPw", actionGetter: getSendNewPasswordAction );
var registeredTable = EwfTable.Create( caption: "Registered users" );
registeredTable.AddItem(
new EwfTableItem(
( "You may log in to this system if you have registered your email address with " + FormsAuthStatics.SystemProvider.AdministratingCompanyName ).ToCell(
new TableCellSetup( fieldSpan: 2 ) ) ) );
emailAddress = new DataValue<string>();
var emailVl = new BasicValidationList();
registeredTable.AddItem(
new EwfTableItem( "Email address", emailAddress.GetEmailAddressFormItem( "", "Please enter a valid email address.", emailVl ).ToControl() ) );
logInPb.AddValidations( emailVl );
newPasswordPb.AddValidations( emailVl );
var password = new DataValue<string>();
registeredTable.AddItem(
new EwfTableItem(
"Password",
FormItem.Create(
"",
new EwfTextBox( "", masksCharacters: true ),
validationGetter: control => new EwfValidation( ( pbv, v ) => password.Value = control.GetPostBackValue( pbv ), logInPb ) ).ToControl() ) );
if( FormsAuthStatics.PasswordResetEnabled ) {
registeredTable.AddItem(
new EwfTableItem(
new PlaceHolder().AddControlsReturnThis(
"If you are a first-time user and do not know your password, or if you have forgotten your password, ".GetLiteralControl(),
new PostBackButton( newPasswordPb, new TextActionControlStyle( "click here to immediately send yourself a new password." ), usesSubmitBehavior: false ) )
.ToCell( new TableCellSetup( fieldSpan: 2 ) ) ) );
}
ph.AddControlsReturnThis( registeredTable );
var specialInstructions = EwfUiStatics.AppProvider.GetSpecialInstructionsForLogInPage();
if( specialInstructions != null )
ph.AddControlsReturnThis( specialInstructions );
else {
var unregisteredTable = EwfTable.Create( caption: "Unregistered users" );
unregisteredTable.AddItem( new EwfTableItem( "If you have difficulty logging in, please " + FormsAuthStatics.SystemProvider.LogInHelpInstructions ) );
ph.AddControlsReturnThis( unregisteredTable );
}
EwfUiStatics.SetContentFootActions( new ActionButtonSetup( "Log In", new PostBackButton( logInPb ) ) );
var logInMethod = FormsAuthStatics.GetLogInMethod(
this,
emailAddress,
password,
getUnregisteredEmailMessage(),
"Incorrect password. If you do not know your password, enter your email address and send yourself a new password using the link below.",
logInPb );
logInPb.AddModificationMethod( () => user = logInMethod() );
}