标题:关于重写页面中的loadviewstate和saveviewstate
只看楼主
rgbtdkjcel
Rank: 1
等 级:新手上路
帖 子:294
专家分:0
注 册:2007-3-26
结帖率:50%
 问题点数:0 回复次数:0 
关于重写页面中的loadviewstate和saveviewstate
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class _Default : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            Label1.Text = "aaaaaa";
            ViewStateControl1.ViewStateText = "visual studeo";
        }
    }
    protected override void LoadViewState(object savedState)
    {
    }
    protected override object SaveViewState()
    {
     
    }
    protected override void Render(HtmlTextWriter writer)
    {
        Response.Write("只显示render部份");
        base.Render(writer);
        Response.End();
    }
}
我在页面中重写了loadviewstate和saveviewstate后,那上述代码中,是不是同样可以达到禁用控件的状态呢?因为在loadviewstate和saveviewstate中没有写任何代码!可不可以达到呢?
搜索更多相关主题的帖子: 页面 重写 
2009-11-18 07:23



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-292685-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.533271 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved