1
코드가 페이지로로드되지 않습니다. 이 문제는 무엇입니까? pageload에 중단 점을 사용했지만 페이지로드가되지 않습니다. 왜 이런 일이 일어 났습니까? 내가 이러한 상태에서이PageLoad가 작동하지 않습니다.
public partial class UploadVideo : System.Web.UI.Page
{
public string UploadVideoToFolder()
{
string vTitle = "";
string vDesc = "";
string FilePath = HttpContext.Current.Server.MapPath("~/ProductVideos/" + HttpContext.Current.Request.Form["title"]);
HttpFileCollection MyFileCollection = HttpContext.Current.Request.Files;
if (MyFileCollection.Count > 0)
{
// Save the File
try
{
MyFileCollection[0].SaveAs(FilePath);
return "1";
}
catch (Exception ex)
{
return "-1";
}
}
else
return "-1";
}
protected void Page_Load(object sender, EventArgs e)
{
string result = UploadVideoToFolder();
Response.Write(result);
}
}
}
확인 디버깅의 이름을 잘못 쓴 예를 들어, 해결하기 쉽습니다. autoeventwireup = true를 시도하십시오. –