0

I have two webform say wf1 and wf2,

I've data in wf1 gridview gv1, Now i'm trying to copy this data to another form like

wf2.gv2.DataSource=gv1.DataSource; 
wf2.gv2.DataBind(); 

if I see using breakpoint, I have data in gv2 of wf2, but when i try to view that gv2 in wf2, there is no record in it. In wf2 i have added

 myDiv.Controls.Add(gv2); 

Hope you understand my question. Can you tell me why, I'm struck in this issue for 3 days

4

1 回答 1

1

gv1 不是持久性和失去它的状态。

您需要检查的是:当页面完全呈现时,gv1 已经丢失了它的值,就像您在其他 Web 表单上一样。您需要找到不同的方法或尝试使用页面加载方法

于 2012-11-21T14:33:49.583 回答