/// <summary> /// <para>Overrides the method, which saves the state to the ViewState. The DatePattern object is saved here to the /// ViewState.</para> /// </summary> /// <returns>an object containing the saved state of this control. Can not be null.</returns> protected override object SaveViewState() { //Save the DatePattern to Viewstate if (datePattern != null) { string datePatternStr = datePattern.ToString(); if (datePatternStr != datePatternInitialString) { ViewState["DatePattern_" + ID] = datePatternStr; } } return(base.SaveViewState()); }
public void TestToString() { string s = dp.ToString(); Assert.AreEqual(s, "<DatePattern />", "Wrong ToString implementation."); }