2 using System
.Collections
;
3 using System
.ComponentModel
;
7 using System
.Web
.SessionState
;
9 using System
.Web
.UI
.WebControls
;
10 using System
.Web
.UI
.HtmlControls
;
11 using Castle
.MonoRail
.Framework
;
13 namespace TestSite
.views
.registration
16 /// Summary description for postback.
18 public class postback
: System
.Web
.UI
.Page
, IControllerAware
20 protected System
.Web
.UI
.WebControls
.Button Save
;
21 protected System
.Web
.UI
.WebControls
.Label postCount
;
22 private Controller _controller
;
24 protected int PostCount
28 if (!_controller
.PropertyBag
.Contains("postCount"))
30 _controller
.PropertyBag
["postCount"] = 0;
33 return (int) _controller
.PropertyBag
["postCount"];
37 private void Page_Load(object sender
, System
.EventArgs e
)
41 #region Web Form Designer generated code
42 override protected void OnInit(EventArgs e
)
45 // CODEGEN: This call is required by the ASP.NET Web Form Designer.
47 InitializeComponent();
52 /// Required method for Designer support - do not modify
53 /// the contents of this method with the code editor.
55 private void InitializeComponent()
57 this.Load
+= new System
.EventHandler(this.Page_Load
);
62 public void SetController(Controller controller
)
64 _controller
= controller
;
67 public void DoAPostBack(object sender
, EventArgs args
)
73 _controller
.Send( "DoAPostBack" );
75 postCount
.Text
= PostCount
.ToString();