不包含定义
来源:互联网 发布:用友票据通软件 编辑:程序博客网 时间:2024/05/21 11:34
为什么编译的时候一直提示不包含File1的定义,可运行起来又很正常,编译老过不去,真郁闷。
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
public partial class product_up_data : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
//string path = Request.QueryString["tbxLogo"];
//Response.Write("<script>window.alert('path:" + path + "');</script>");
}
}
protected void Button2_Click1(object sender, EventArgs e)
{
if (this.File1.Value == "")
{
Response.Write("<script>window.alert('请选择图片文件!');</script>");
}
else
{
string path = Request.QueryString["tbxLogo"];
string type = "shop";
string nam = File1.PostedFile.FileName;
int i = nam.LastIndexOf(".");
string newext = nam.Substring(i);
if (newext != ".jpg")
{
Response.Write("<script>window.alert('必须是后缀名为.jpg的文件!');</script>");
}
else
{
if (File1.PostedFile.ContentLength > 200000)
{
// Response.Write("<script>window.alert('" + myFile.PostedFile.ContentLength.ToString() + "');</script>");
Response.Write("<script>window.alert('对不起,你上传的文件太大了!');</script>");
}
else
{
File1.PostedFile.SaveAs(Server.MapPath("" + path + "" + Session["user_id"].ToString() + type + newext));
Response.Write("<script>");
Response.Write("alert('文件上传成功!');");
Response.Write("window.returnValue='" + Session["user_id"].ToString() + type + newext + "';");
//Response.Write("close();");
Response.Write("</script>");
}
}
}
}
- 不包含定义
- 不包含“Contains”的定义
- 不包含“SaveChanges”的定义
- “string”不包含“SubString”的定义
- UnityEngine.Mesh不包含 GetTriangleScript的定义
- “System.Web.UI.UserControl“不包含“xxxx”的定义
- System.Web.UI.UserControl“不包含“xxxxxxxxx”的定义
- System.Web.Mvc.HtmlHelper”不包含“ActionLink”的定义
- C#“System.Data.DataRow[]”不包含“Where”的定义
- System.Nullable<System.DateTime>”不包含“Year”的定义
- 不包含SDK头文件, 补全API定义
- “System.Linq.IQueryable<int>”不包含“Contains”的定义 或者“System.Linq.IEnumberable<int>”不包含“Contains”的定义
- 兼容IE/FF的统一定义input的border 同时不包含radio/checkbox
- System.Guid[] 不包含 Contains 的定义,并且最佳扩展方法重载参数无效
- “System.Collections.Generic.IEnumerable<TestDAL.HistoryData>”不包含“ToList”的定义
- “不包含定义,并且找不到可接受类型的第一个扩展方法”
- “System.Web.UI.Page”不包含“DataItem”的定义,问题的解决
- C# WPF 不包含"XXXX_Loaded"的定义 找不到可接受类型为 问题原因 解决办法
- 十二种值得深交的男生和十一种值得深交的女生
- 十二种值得深交的男生和十一种值得深交的女生
- 十二种值得深交的男生和十一种值得深交的女生
- 十二种值得深交的男生和十一种值得深交的女生
- 如何:为 ASP.NET 网站创建资源文件 (Visual Studio)
- 不包含定义
- Web Client Software Factory v2.0发布
- python目录与文件操作
- 鄙视你,书看了四分之一又看不下去了!!!!
- 开发团队哪档子事!!!
- ITCAST最新上线课程
- vb中的一些隐式声明
- php 取得文件名,不包含后缀
- PHP中的字符串函数(String Functions)