服务器控件和 viewstate

        //不会产生处理回发事件的方法。类似客户端html
        Repeater rep = new Repeater();
        DataList dtl = new DataList();
        FileUpload fil = new FileUpload();
        HyperLink hy = new HyperLink();
        AdRotator adr = new AdRotator();
        Image ima = new Image();
        Label fdfk = new Label();


        //控件的状态通过IPostBackDataHandler接口处理,是ViewState的机制,生成类似如下的代码:
input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE"
value="/wEPDwUKMjA0OTM4MTAwNGRk5nKoxvYg5xYYaGq0l2c6t+p8p3plHndJQyYKYhyg6Hs=" />
TextBox b= new TextBox(); CheckBox bn = new CheckBox(); CheckBoxList bnt = new CheckBoxList(); RadioButton re = new RadioButton(); RadioButtonList ret = new RadioButtonList(); DropDownList dddf = new DropDownList(); HiddenField hidd = new HiddenField(); ImageButton midd = new ImageButton();//yyy //服务器控件为处理回发事件而产生的方法。继承自:IPostBackEventHandler,禁用viewstat后,生成类似如下的代码:

     <input type="hidden" name="__EVENTVALIDATION" id="__EVENTVALIDATION" value="/wEWAgKHsdXGBQKM54r
     GBjcxpNvbuY4N8yL9GzYUAYi6wv0NlR9iXO6jWPenADy8" />




GridView gr = new GridView(); Button ddd = new Button(); Calendar cal = new Calendar(); BulletedList bull = new BulletedList(); ImageButton midddr = new ImageButton(); //yyy LinkButton lindd = new LinkButton(); Table tabb = new Table();

 

你可能感兴趣的:(view)