我的自定义控件是在客户端渲染canvas元素。我需要保持视图状态以供我控制吗?
任何帮助都将不胜感激。
[JsonIgnore]
[PersistenceMode(PersistenceMode.InnerProperty)]
[Browsable(true)]
[Bindable(true)]
public CircularGaugeProperties Model
{
get
{
CircularGaugeProperties modelData = (CircularGaugeProperties)this.ViewState["Model"];
if (modelData == null)
{
this.ViewState["Model"] = modelData = this.model;
}
return modelData;
}
set
{
this.ViewState["Model"] = value;
}
}
CircularGaugeProperties中有几个集合