asp.net 上传文件 代码无效 20
<htmlxmlns="http://www.w3.org/1999/xhtml"><head><title></title></head><body><formacti...
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
</head>
<body>
<form action="Default2.aspx" enctype="multipart/form-data" method="post">
<div>
<input id="Text1" name="Text1" type="text" />
<input id="Text2" type="text" />
<input id="Radio1" type="radio" />
<input id="File1" type="file" />
<input id="File2" type="file" /><input id="Submit1" type="submit" value="subit" />
</div>
</form>
</body>
</html>
Request.Files[0].SaveAs("d\\ss1.jpg");
Response.Write(Request.Files.Count.ToString());
结果文件数是0 获取不了文件 展开
<head>
<title></title>
</head>
<body>
<form action="Default2.aspx" enctype="multipart/form-data" method="post">
<div>
<input id="Text1" name="Text1" type="text" />
<input id="Text2" type="text" />
<input id="Radio1" type="radio" />
<input id="File1" type="file" />
<input id="File2" type="file" /><input id="Submit1" type="submit" value="subit" />
</div>
</form>
</body>
</html>
Request.Files[0].SaveAs("d\\ss1.jpg");
Response.Write(Request.Files.Count.ToString());
结果文件数是0 获取不了文件 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询