2013-10-19 1 views
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); 
    } 
    } 
} 
+0

확인 디버깅의 이름을 잘못 쓴 예를 들어, 해결하기 쉽습니다. autoeventwireup = true를 시도하십시오. –

답변

1

을 도와 일반적으로 문제는 web.config 파일에서 사용 가능 여부를 Response.Redirect("name.aspx");

+0

문제가 생겼습니다. 그건 내 실수 였어. 사실 바보 같은 실수. – Manu

관련 문제