public static string GetStringParameter(StateBag viewState, string fieldName, string defaultValue) { string returnValue = WebFormsHelper.GetStringViewState(viewState, fieldName); if (string.IsNullOrEmpty(returnValue)) { returnValue = defaultValue; } return(returnValue); }
public static string GetRequiredStringViewState(StateBag viewState, string fieldName) { string returnValue = WebFormsHelper.GetStringViewState(viewState, fieldName); if (string.IsNullOrEmpty(returnValue)) { throw new Exception(string.Format("Missing required ViewState string value \"{0}\"", fieldName)); } return(returnValue); }
protected string GetStringViewState(string fieldName) { return(WebFormsHelper.GetStringViewState(this.ViewState, fieldName)); }