Exemplo n.º 1
0
        public void ViewState2()
        {
            CustomControl c    = new CustomControl();
            CustomControl copy = new CustomControl();
            object        state;

            c.DoTrackViewState();
            c.CustomProperty           = "CustomProperty";
            c.ControlStyle.BackColor   = Color.Red;
            c.ControlStyle.BorderColor = Color.Green;
            c.ControlStyle.BorderStyle = BorderStyle.Dotted;

            state = c.DoSaveViewState();

            copy.DoLoadViewState(state);

            Assert.IsFalse(copy.ControlStyleCreated, "copy.ControlStyleCreated");
        }
Exemplo n.º 2
0
		public void ViewState2 () {
			CustomControl c = new CustomControl ();
			CustomControl copy = new CustomControl ();
			object state;

			c.DoTrackViewState ();
			c.CustomProperty = "CustomProperty";
			c.ControlStyle.BackColor = Color.Red;
			c.ControlStyle.BorderColor = Color.Green;
			c.ControlStyle.BorderStyle = BorderStyle.Dotted;

			state = c.DoSaveViewState ();

			copy.DoLoadViewState (state);

			Assert.IsFalse (copy.ControlStyleCreated, "copy.ControlStyleCreated");
		}