是否可以维护客户端渲染控制的视图状态?

时间:2014-05-21 12:04:50

标签: asp.net custom-controls viewstate

我的自定义控件是在客户端渲染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中有几个集合

0 个答案:

没有答案