|
===============================================
ExtAspNet和浏览器版本:IE8
问题描述:只要在页面上增加了 FileUpload 控件, 只是测试,想点"Btn末张"button,弹出所选文件的路径名而于.
提示错误如下:
行 136: protected void Btn末张_Click(object sender, EventArgs e)行 137: {行 138: Alert.ShowInTop(FileUpload1.FileName );行 139: }行 140: protected void Btn关闭_Click(object sender, EventArgs e) |
源文件: e:\【C#项目】\3z_资产源管理\FA\Base\Fa_kpys_zc1.aspx.cs 行: 138
堆栈跟踪:
[NullReferenceException: 未将对象引用设置到对象的实例。] ExtAspNet.FileUpload.get_FileName() +8 FA_Base_Fa_kpys_zc1.Btn末张_Click(Object sender, EventArgs e) in e:\【C#项目】\3z_资产源管理\FA\Base\Fa_kpys_zc1.aspx.cs:138 ExtAspNet.Button.OnClick(EventArgs e) +83 ExtAspNet.Button.RaisePostBackEvent(String eventArgument) +16 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +176 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5563 |
测试代码或示例:
请下载附件
实际与期望的运行结果:
弹出 fileupload 所选择的文件
截图:
===============================================
|
|