public void DataControlField_ViewState()
        {
            DerivedDataControlField field    = new DerivedDataControlField();
            DerivedDataControlField newField = new DerivedDataControlField();

            field.DoTrackViewState();
            field.FooterStyle.BackColor = Color.Red;
            field.ItemStyle.BackColor   = Color.Red;
            field.HeaderStyle.BackColor = Color.Red;
            object state = field.DoSaveViewState();

            newField.DoLoadViewState(state);
            Assert.AreEqual(Color.Red, newField.HeaderStyle.BackColor, "HeaderStyle");
            Assert.AreEqual(Color.Red, newField.ItemStyle.BackColor, "ItemStyle");
            Assert.AreEqual(Color.Red, newField.FooterStyle.BackColor, "FooterStyle");
        }
Esempio n. 2
0
		public void DataControlField_ViewState ()
		{
			DerivedDataControlField field = new DerivedDataControlField ();
			DerivedDataControlField newField = new DerivedDataControlField ();
			field.DoTrackViewState ();
			field.FooterStyle.BackColor = Color.Red;
			field.ItemStyle.BackColor = Color.Red;
			field.HeaderStyle.BackColor = Color.Red;
			object state = field.DoSaveViewState();
			newField.DoLoadViewState (state);
			Assert.AreEqual (Color.Red, newField.HeaderStyle.BackColor, "HeaderStyle");
			Assert.AreEqual (Color.Red, newField.ItemStyle.BackColor, "ItemStyle");
			Assert.AreEqual (Color.Red, newField.FooterStyle.BackColor, "FooterStyle");
		}