我有一个旧的ASP.NET
网页。当我按F5时,Visual Studio给了我错误:
0x800a138f - JavaScript运行时错误:无法获取属性' txtAppl'未定义或空引用。
HTML页面,
<%@ Page Language="C#" Debug="true" %>
<script runat="server" src="uzpo2003_tbbuild.cs"></script>
<html>
<head>
<title></title>
<script type="text/javascript" src="uzpo2003_client.js"></script>
</head>
<body onload="form_load();">
</body>
</html>
uzpo2003_client.js,
function form_load() {
if (document.formSelect.txtAppl.value == -99999999)
return null;
}
uzpo2003_tbbuild.cs,
public class TableBuild
{
StringBuilder output = new StringBuilder();
public string tblBuilder(string department, string un)
{
int dept = int.Parse(department);
string dom;
dom = "<center><table border='0' style='font:14pt;' bgcolor='#A7C7B7'>";
dom += "<input type = 'text' name = 'txtAppl' value = '' size=16 id = 'Text1'></P>";
return output.ToString();
}
}
我该如何解决这个问题?