我做了一个上传组件,但是在回送的时候却取不到数据,请问是为什么 我生成的html代码是这样的
<div id="UpLoadDiv">
<div style="width:400;height:24;">
<div style="width:65%;display:inline;">
<input type="file" style="width:240px;height:22px;" /></div><div style="width:18%;display:inline;">
<input type="button" value="上传" onclick="javascript:__doPostBack('UpLoad1','');" style="width:60px;height:24px;" /></div><div style="width:17%;display:inline;">
<input value="增加" onclick="AddNewRow()" type="button" style="width:60;height:24;" /></div></div></div>在组件的
public void RaisePostBackEvent(string eventArgument)
{
this.UpLoadFile(EventArgs.Empty);
} #region 上传文件并写水印
private void UpLoadFile(EventArgs e)
{
System.Web.HttpFileCollection files = System.Web.HttpContext.Current.Request.Files;
System.Web.HttpContext.Current.Response.Write(files[0].FileName);
}
#endregion
这个事件中却取不到上传上来的数据
请问是为什么