상세 컨텐츠

본문 제목

닷넷 페이지 에러나는 위치와 정보확인

C++,C#, ASP.NET

by 김일국 2010. 8. 29. 15:59

본문

@페이지 지시자에 Debug="true" 사용하면 에러위치와 에러처리방법이 출력된다.

 

<%@ Page Language="C#" AutoEventWireup="true" Debug="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
   
    </div>
    </form>
</body>
</html>
---------------------------------------------------------------------------------------

샘플 코드비하인드 파일

 

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class _Default : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        string s = null;
        //string s = "TRUE";
        Response.Write(s.ToString());
    }
}

관련글 더보기

댓글 영역