에서 컨트롤을 참조 나는 다음과 같은 코드가 있습니다ASP.NET은 .ASPX 파일
<html xmlns="http://www.w3.org/1999/xhtml">
<body style="height: 1336px">
<input type="hidden" id="loadingtime"/>
.
.
.
.
</body>
</html>
과 Code.cs 파일은 다음과 같습니다
using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Diagnostics;
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void Button1_Click(object sender, EventArgs e)
{
string s = "";
HiddenField t = (HiddenField)Page.FindControl("loadingtime");
s = t.Value;
Response.Write("<script language='javascript'>alert('It took : " + s + "')</script>");
}
}
나는 오류 어떤 생각을?
편집 : 위의 문제는 에 의해 성공적으로 해결되었습니다. 이제로드 시간 값을 검색 할 때 값은 빈 문자열입니다. 아무도 이것을 해결할 수 있습니까?
오류 ???????? –
NullReference ... – Kameron