2 using System
.Collections
;
3 using System
.ComponentModel
;
5 using System
.Web
.SessionState
;
7 using System
.Web
.UI
.WebControls
;
8 using System
.Web
.UI
.HtmlControls
;
9 using Castle
.MonoRail
.Framework
;
11 namespace Castle
.Applications
.PestControl
.Web
.Views
.Registration
13 public class Index
: System
.Web
.UI
.Page
, IControllerAware
15 protected System
.Web
.UI
.WebControls
.TextBox email
;
16 protected System
.Web
.UI
.WebControls
.TextBox passwd
;
17 protected System
.Web
.UI
.WebControls
.Button LoginIn
;
18 protected System
.Web
.UI
.WebControls
.Button SignUp
;
19 protected System
.Web
.UI
.WebControls
.TextBox name
;
20 protected System
.Web
.UI
.WebControls
.TextBox passwd2
;
21 protected System
.Web
.UI
.WebControls
.Button Save
;
22 protected System
.Web
.UI
.WebControls
.ValidationSummary ValidationSummary1
;
23 private Controller _controller
;
25 private void Page_Load(object sender
, System
.EventArgs e
)
27 Save
.Click
+= new EventHandler(OnSave
);
30 #region Web Form Designer generated code
31 override protected void OnInit(EventArgs e
)
34 // CODEGEN: This call is required by the ASP.NET Web Form Designer.
36 InitializeComponent();
41 /// Required method for Designer support - do not modify
42 /// the contents of this method with the code editor.
44 private void InitializeComponent()
46 this.Load
+= new System
.EventHandler(this.Page_Load
);
51 public void SetController(Controller controller
)
53 _controller
= controller
;
56 public void OnSave(object sender
, EventArgs args
)
58 // Any validation to perform?
60 // TODO: Add ASP.Net Validators
62 // So lets save the content
64 _controller
.Send("RegisterUser");