帮忙看一下是什么错误,视频上传方面
protected void Button提交_Click(object sender, EventArgs e)
{
ds = ser.Select( "select * from 视频表_ ", "视频表_ ");
DataRow dr = ds.视频表_.NewRow();
dr[ "视频名称 "] = TextBox1.Text;
FileUpload1.SaveAs(this.Request.PhysicalApplicationPath + "Images\\ " + dr[ "编号 "].ToString() + System.IO.Path.GetFileName(FileUpload1.PostedFile.FileName));
dr[ "视频地址 "] = HttpContext.Current.Request.ApplicationPath + "/ " + "Images/ " + dr[ "编号 "].ToString() + System.IO.Path.GetFileName(FileUpload1.PostedFile.FileName);
dr[ "备注 "] = TextBox3.Text;
Response.Write(dr[ "视频地址 "]);
string 视频名称 = TextBox1.Text;
string 备注信息 = TextBox3.Text;
int i = ser.Insert( "insert into 视频表_(视频名称,视频地址,更新时间,备注) values ( ' " + 视频名称 + " ', ' " + dr[ "视频地址 "] + " ', ' " + DateTime.Now + " ', ' " + 备注信息 + " ') ");
dr.EndEdit();
ds.视频表_.Rows.Add(dr);
Response.Redirect( "~/Manager/ShiPin.aspx ");
}
这个传图片,文体都好使,但传视频,就会跳到“无法显示页”页,怎么回事啊?
谁有好使的代码教教呗!谢谢了!!!!!
------解决方案--------------------UP
------解决方案--------------------你的文件小于4M吧,修改或添加web.config里的项
<configuration>
<system.web>
<httpRuntime useFullyQualifiedRedirectUrl="true" maxRequestLength="1024000" executionTimeout="900"/>
</system.web>
</configuration>
不解释了