<input style="margin-right:100px; type ="file" runat="server" id="File1" />
File1.PostedFile.FileName 提示未将对象引用设置到对象的实例 菜鸟求助
大家帮一下忙
File1.PostedFile.FileName 提示未将对象引用设置到对象的实例 菜鸟求助
大家帮一下忙
解决方案 »
- Server is too busy??
- Excel单元格位置取得的问题
- datalist怎么控制列之间的距离,列的宽度
- asp.net2.0 嵌套模板页
- 首页出现了“未将对象引用设置到对象的实例”,哪位大哥帮忙解决?
- 最近在开什么<SD2.0大会>,有没有人去听过
- js 数组问题,谢谢;在线等待~~~~
- 有人可以解释一下page_load(s as Object,e as Eventargs)吗?
- 开发自定义控件时,如何把.html 文件编译进.DLL中???
- 各位高手帮帮忙,我的三层web应用程序的部署问题!
- 请帮忙看看下面的下拉框的问题,附有代码请高手指点
- 求一个用asp.net编写的解决方案来参考!必须是有工作经验的人写的!
string ImgName = strPath.Substring(strPath.LastIndexOf("\\")+1);
string ImgExtend = strPath.Substring(strPath.LastIndexOf(".")+1);
if (!(ImgExtend == "bmp" || ImgExtend == "jpg" || ImgExtend == "gif"))
{
Response.Write("<script>alert('上传图片格式不正确')</script>");
return;
}
string Str = Server.MapPath("~/imge/");
string str_Save = Str + ImgName;
File1.PostedFile.SaveAs(str_Save);
string strInsert = string.Format("insert into user1(name,pwd,pic)values('{0}','{1}','{2}')",user1,pwd1,str_Save);这是上传图片的详细方法