System.Web.UI.WebControls.Table的缓存(?)问题??? [英] Caching (?) problem with System.Web.UI.WebControls.Table ???

查看:53
本文介绍了System.Web.UI.WebControls.Table的缓存(?)问题???的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在屏幕上使用System.Web.UI.WebControls.Table控件。 (Dot Net

1.1)


我的问题是这样:表格是在每个

回发时以编程方式重建的。每个表行包含两个文本框,这些文本框最初是从数据库中的
设置的。表中没有任何项目是数据绑定。截至目前,如果

屏幕的前一个实例包含第一行框中的数据,那么即使框中的文本值被清除,数据也会被转移到
代码。

(我已经跟踪并且代码中的方框已被清除。)具有讽刺意味的是,在其他情况下,我依赖于同样的效果来获得
输入数据,

但在这种情况下它是完全不需要的。


这里发生了什么以及如何以这种方式传输数据?

I am using a System.Web.UI.WebControls.Table control on a screen. (Dot Net
1.1)

My problem is this: The table is programmatically reconstructed on every
postback. Each table row contains two textboxes that are intially set from
the database. None of the items in the table are ''databound''. As of now, if
the previous instance of the screen contained data in the first row boxes,
that data is carried over, even if the boxes text value is cleared in code.
(I have traced through and the boxes are being cleared in code.) Ironically,
under other circumstances I depend on this same ''effect'' to get entered data,
but in this case it is completely unwanted.

What is happening here and how can data be carried over in this fashion?

推荐答案



你是对的。在大多数情况下,人们会希望这种情况发生。 (即一个

希望从ViewState填充文本框,其中值为用户输入的值为
,这被认为是正确的结果)

如果您只想丢弃这些控件上的ViewState,请设置

EnableViewState =" False"在那些文本框上


-

HTH,

Phillip Williams
http://www.societopia.net
http://www.webswapp.com

" B。 Chernick"写道:

You are right. In most situations, one would want this to happen. (i.e. one
would want the textboxes to be populated from the ViewState with the values
that the user entered which is considered the correct outcome)

If you simply want to discard the ViewState on those controls then set the
EnableViewState ="False" on those textboxes

--
HTH,
Phillip Williams
http://www.societopia.net
http://www.webswapp.com
"B. Chernick" wrote:
我在屏幕上使用System.Web.UI.WebControls.Table控件。 (Dot Net
1.1)

我的问题是这样的:该表是在每个
回发上以编程方式重建的。每个表行包含两个文本框,这些文本框是从数据库中初始设置的。表中没有任何项目是数据绑定。截至目前,如果屏幕的前一个实例包含第一行框中的数据,那么数据将被转移,即使在代码中清除了框文本值。
(I已经跟踪并且代码清除了盒子。)具有讽刺意味的是,在其他情况下,我依靠同样的效果来获取输入的数据,但在这种情况下,它是完全不需要的。

这里发生了什么以及如何以这种方式传递数据?
I am using a System.Web.UI.WebControls.Table control on a screen. (Dot Net
1.1)

My problem is this: The table is programmatically reconstructed on every
postback. Each table row contains two textboxes that are intially set from
the database. None of the items in the table are ''databound''. As of now, if
the previous instance of the screen contained data in the first row boxes,
that data is carried over, even if the boxes text value is cleared in code.
(I have traced through and the boxes are being cleared in code.) Ironically,
under other circumstances I depend on this same ''effect'' to get entered data,
but in this case it is completely unwanted.

What is happening here and how can data be carried over in this fashion?



这就是问题所在。我不想摆脱观点状态。我需要

...部分时间。我如何控制这个?


" Phillip Williams"写道:
Well that''s the problem. I don''t want to get rid of the viewstate. I need
it... part of the time. How do I control this?

"Phillip Williams" wrote:

你是对的。在大多数情况下,人们会希望这种情况发生。 (即一个
希望从ViewState填充文本框,其中包含用户输入的值,这被认为是正确的结果)

如果您只是想丢弃然后在这些控件上的ViewState设置
EnableViewState =" False"在那些文本框上

-
HTH,
Phillip Williams
http://www.societopia.net
http: //www.webswapp.com

" B。 Chernick"写道:

You are right. In most situations, one would want this to happen. (i.e. one
would want the textboxes to be populated from the ViewState with the values
that the user entered which is considered the correct outcome)

If you simply want to discard the ViewState on those controls then set the
EnableViewState ="False" on those textboxes

--
HTH,
Phillip Williams
http://www.societopia.net
http://www.webswapp.com
"B. Chernick" wrote:
我在屏幕上使用System.Web.UI.WebControls.Table控件。 (Dot Net
1.1)

我的问题是这样的:该表是在每个
回发上以编程方式重建的。每个表行包含两个文本框,这些文本框是从数据库中初始设置的。表中没有任何项目是数据绑定。截至目前,如果屏幕的前一个实例包含第一行框中的数据,那么数据将被转移,即使在代码中清除了框文本值。
(I已经跟踪并且代码清除了盒子。)具有讽刺意味的是,在其他情况下,我依靠同样的效果来获取输入的数据,但在这种情况下,它是完全不需要的。

这里发生了什么以及如何以这种方式传递数据?
I am using a System.Web.UI.WebControls.Table control on a screen. (Dot Net
1.1)

My problem is this: The table is programmatically reconstructed on every
postback. Each table row contains two textboxes that are intially set from
the database. None of the items in the table are ''databound''. As of now, if
the previous instance of the screen contained data in the first row boxes,
that data is carried over, even if the boxes text value is cleared in code.
(I have traced through and the boxes are being cleared in code.) Ironically,
under other circumstances I depend on this same ''effect'' to get entered data,
but in this case it is completely unwanted.

What is happening here and how can data be carried over in this fashion?



你怎么知道如果您看到的数据是您需要的数据?

为什么它们是文本框?他们可以编辑和保存吗?或者只是为了查看数据而只需要


如果只是为了查看数据 - 标签应该在那里 - 而不是文本框。

如果要编辑数据 - 尝试使用IE中的Ctrl + F5刷新那些

文本框。


问候,


Stas K.

How do you know if the data your seeing is the one you need?
And Why are they text boxes? can they be edited and saved? or is it
just to see the data?

If its just to see the data - Labels should be there - not text boxes.
If its to edit the data - try using the Ctrl+F5 in IE to refresh those
text boxes.

regards,

Stas K.


这篇关于System.Web.UI.WebControls.Table的缓存(?)问题???的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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