int ,string and ViewState

    技术2022-05-11  94

         [Bindable(true)]        [Category("Appearance")]        [DefaultValue("0")]        [Localizable(true)]        public int WindowWidth        {           get            {                object o =ViewState ["WindowWidth"];                if(o!=null)                {                    return int.Parse(ViewState ["WindowWidth"].ToString());                }                else                {                    return 0;                }            }            set            {                ViewState ["WindowWidth"] = value;            }        }

    [Bindable(true)]        [Category("Appearance")]        [DefaultValue("")]        [Localizable(true)]        public string URL        {            get            {                String s = (String)ViewState["URL"];                return ((s == null) ? String.Empty : s);            }            set            {                ViewState["URL"] = value;            }        }


    最新回复(0)