C#asp.net问题与视图状态 [英] c# asp.net problem with view state

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

问题描述

你好,我对一个概念有疑问..

如果我正在从显示所有产品的数据库中读取网格视图,
我应该禁用它的视图状态吗?

教师禁用视图状态,并且在页面加载事件上绑定datagridview时,
他测试了是否发回、、、

Hello, i have a problem with a concept ..

If i am reading a grid view from the database that shows all the products,
should i disable the view state for it ??

the teacher disable the view state , and when he binds the datagridview on page load event,
he tested if post back,,,,

if(!isPostBack){
//binding the data grid view
}


他说我们必须将视图状态模式禁用为false ...

为什么是那个?
请帮助


and he said we must disable the view state mode to false...

why is that ???
Please help

推荐答案

请通过以下链接....

链接02 [
Please go through the links below....

Link 01[^]

Link 02[^]

Regards
Sebastian


如果禁用viewstate,则必须在每次回发时调用绑定函数.如果要在首次加载时调用它,则必须保持视图状态为启用状态.
If you disable the viewstate then you will have to call the binding function on every postback. if you want to call it on first load then you will have to keep the viewstate enabled.


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

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