public void InstantiateIn (Control container)
{
Table table = new Table ();
table.ControlStyle.Width = Unit.Percentage (100);
table.ControlStyle.Height = Unit.Percentage (100);
// Row #0
table.Controls.Add (
CreateRow (new LiteralControl (_cPassword.SuccessTitleText), _cPassword.TitleTextStyle, HorizontalAlign.Center));
// Row #1
table.Controls.Add (
CreateRow (new LiteralControl (_cPassword.SuccessText), _cPassword.SuccessTextStyle, HorizontalAlign.Center));
// Row #3
WebControl ContinueButton = null;
switch (_cPassword.ChangePasswordButtonType) {
case ButtonType.Button:
ContinueButton = new Button ();
break;
case ButtonType.Image:
ContinueButton = new ImageButton ();
break;
case ButtonType.Link:
ContinueButton = new LinkButton ();
break;
}
ContinueButton.ID = "ContinuePushButton";
ContinueButton.ApplyStyle (_cPassword.ContinueButtonStyle);
((IButtonControl) ContinueButton).CommandName = ChangePassword.ContinueButtonCommandName;
((IButtonControl) ContinueButton).Text = _cPassword.ContinueButtonText;
((IButtonControl) ContinueButton).CausesValidation = false;
table.Controls.Add (
CreateRow (ContinueButton, null, HorizontalAlign.Right));
container.Controls.Add (table);
}
}