0

hi i have usercontrol on which there is one file upload control, user control is inside Tab container which on aspx page.hirarchy is like bellow:

1.Master Page 2.aspx Page having ajax tab control. 3.User control which is inside tab container. 4.file upload control which is on user control. and submit button

Problem i am facing: When i click on submit button as page load event is called before buttons on click event value of file upload control is getting nulll.

could you please tell me how can i fetch the file upload control value after postback. thanks is advance.

4

1 回答 1

1

文件上传控件不会随每个请求保留已发布的文件。
当用户选择一个文件时,它将在发生的下一个 PostBack 请求中可用。

您应该在每次回发时检查PostedFile并将此文件保存在服务器上。
在 ViewState 中保留对其路径的引用。
然后,您可以在用户完成所有输入后处理该文件。

于 2013-04-05T08:39:47.670 回答