在asp.net视图状态中的问题 [英] problem in View State at asp.net

查看:93
本文介绍了在asp.net视图状态中的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我在页面指令中将enableviewstate属性设置为false.

我只是运行该应用程序,并在文本框控件中输入了一些文本,然后单击了按钮.

页面已回发,并且在文本框中输入的文本仍然存在.

为什么即使禁用视图状态也会发生这种情况?

你能帮我解决这个问题吗,

在此先感谢.

Hi All,

I set enableviewstate property to false in page directive.

I just run the application and entered some text in textbox control and clicked button.

The page is postbacked and the text entered in textbox persists.

Why this happens even the view state is disabled?

Can you help me to solve this,

Thanks in Advance.

推荐答案

请参阅此链接

http://support.microsoft.com/?id=316813 [
see this link

http://support.microsoft.com/?id=316813[^]


添加
if (ispostback=false)then
'your code
end if


在您的页面上加载
但如果autopostback = true,请先查看文本框的属性


on your page load
but first look on the properties of your textbox if autopostback = true


,因为那是继承体系
1.页面请求
2.开始
4.初始化
4.页面加载
5.回发
6.渲染
7.卸载
because thats the heirarchy
1. Page Request
2. Start
4. Initializes
4. Pageload
5. PostBack
6. Render
7. Unload


这篇关于在asp.net视图状态中的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆