当前位置: 代码迷 >> .NET组件控件 >> 这个小弟我自己编的自定义控件
  详细解决方案

这个小弟我自己编的自定义控件

热度:6997   发布时间:2013-02-25 00:00:00.0
请高手看看这个我自己编的自定义控件
我这个控件可以调用,就是无法正确显示控件.请高手帮忙看看!
namespace   mycontrol
{
using   System;
using   System.Collections.Generic;
using   System.ComponentModel;
using   System.Text;
using   System.Web;
using   System.Web.UI;
using   System.Web.UI.WebControls;

        [DefaultProperty( "Text ")]
        [ToolboxData( " <{0}:mycontrol   runat=server> </{0}:mycontrol> ")]

        public   class   mycontrol   :   CompositeControl
        {
               
                [Bindable(true)]
                [Category( "Appearance ")]
                [DefaultValue( " ")]
                [Localizable(true)]
                public   string   textbox1
                {
                        get
                        {
                                String   s   =   (String)ViewState[ "Text "];
                                return   ((s   ==   null)   ?   String.Empty   :   s);
                        }

                        set
                        {
                                ViewState[ "Text "]   =   value;
                        }
                }
                public   string   textbox2
                {
                        get
                        {
                                String   s   =   (String)ViewState[ "Text "];
                                return   ((s   ==   null)   ?   String.Empty   :   s);
                        }

                        set
                        {
                                ViewState[ "Text "]   =   value;
                        }
  相关解决方案