开发者

How to get user control property after Server Transfer

I have a host开发者_Go百科 page with multiple user controls in it. Some of these controls have a user created property named Enabled, and is boolean.

In some controls the default value for Enabled is set to False. In the host page, I am able to access the property and set it to True. The control does what it is supposed to.

On this host page there is a "Run Report" button which executes a Server.Transfer to a "Results" page.

In the codebehind of the results page, control values from the PreviousPage are checked via other user created Properties for the controls and added to a ParamterList.

I am attempting to check the Enabled property of the controls on the PreviousPage, however when this is done, it appears that the Enabled property is set to that of the default (in this case False), and not what I had set it to on the page when it loaded.

Does the value of this property need to be put into a hidden text box or something so its value is available after the ServerTransfer? It seems like any control which contains a value is retrievable via the PreviousPage and its user created property, but any variable set inside of the control is reset back to its default value.


You could try using a session variable to capture the value.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜