CompositeLogin.cs
using
System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Text;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace myControl
... {
[DefaultProperty("Text")]
[ToolboxData("<{0}:CompositeLogin runat='server'></{0}:CompositeLogin>")]
public class CompositeLogin : WebControl,INamingContainer
...{
Text attribute#region Text attribute
[Bindable(true)]
[Category("Appearance")]
[DefaultValue("")]
[Localizable(true)]
public string Text
...{
get
...{
String s = (String)ViewState["Text"];
return ((s == null) ? String.Empty : s);
}
set
...{
ViewState["Text"] = value;
}
}
#endregion
private TextBox _nameTextbox;
private TextBox _passwordTextbox;
private Label _nameLabel;
private Label _passwordLabel;
private Button _button;
private RequiredFieldValidator _namevalidator;
private RequiredFieldValidator _passwordValidator;
private static readonly object EventLogin = new object();
Override Properties#region Override Properties
public override ControlCollection Controls
...{
get
using System.Collections.Generic;
using System.ComponentModel;
using System.Text;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace myControl
... {
[DefaultProperty("Text")]
[ToolboxData("<{0}:CompositeLogin runat='server'></{0}:CompositeLogin>")]
public class CompositeLogin : WebControl,INamingContainer
...{
Text attribute#region Text attribute
[Bindable(true)]
[Category("Appearance")]
[DefaultValue("")]
[Localizable(true)]
public string Text
...{
get
...{
String s = (String)ViewState["Text"];
return ((s == null) ? String.Empty : s);
}
set
...{
ViewState["Text"] = value;
}
}
#endregion
private TextBox _nameTextbox;
private TextBox _passwordTextbox;
private Label _nameLabel;
private Label _passwordLabel;
private Button _button;
private RequiredFieldValidator _namevalidator;
private RequiredFieldValidator _passwordValidator;
private static readonly object EventLogin = new object();
Override Properties#region Override Properties
public override ControlCollection Controls
...{
get