编译器错误信息: VJS1161: 无法找到类型“EventArgs”。
我照着书编写了一段程序,可是编译的时候出现了错误。编译器错误信息: VJS1161: 无法找到类型“EventArgs”。请问这是什么意思?这个问题是如何产生的?怎么解决这个问题啊?
程序如下:
<%@ Page Language="VJ#" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server">
protected void s_click(Object sender, EventArgs e)
{
string str;
str = "身份:";
if (stu.Checkde) str += stu.Value;
else if (tech.Checkde) str += tech.Value;
else str += els.Value;
str += ";学校:" + University.Items[University.SelectdeIndex].ToString();
if (c1.Checked) str += ";专业:" + c1.Value;
if (c2.Checked) str += ";专业:" + c2.Value;
if (c3.Checked) str += ";专业:" + c3.Value;
TextArea1.InnerHtml = str;
}
</script>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>无标题页</title>
</head>
<body>
<form id="form1" runat="server">
<div>
请选择身份:
<input id = "stu" type = "radio" runat = "server" value = "学生" /> 学生
<input id = "tech" type = "radio" runat = "server" value = "教师" /> 教师
<input id ="els" type = "radio" runat = "server" value = "其他" /> 其他
<br />
请选择学校:
<select id ="University" runat ="server" >
<option value ="沈阳理工大学" >沈阳理工大学</option>
<option value ="南京大学" >南京大学</option>
<option value ="东北大学">东北大学</option>
</select>
<br />
请选择科目:
<input id ="c1" runat ="server" type ="checkbox" value ="计算机" />计算机
<input id ="c2" runat ="server" type ="checkbox" value ="通信" />通信
<input id ="c3" runat ="server" type ="checkbox" value ="自动化" />自动化
<br />
您选择的是:
<textarea id ="TextArea1" rows ="5" cols = "4" runat ="server" style="width: 232px" ></textarea>
<br />
<input id = "Sub1" type ="submit" runat ="server" onserverclick ="s_click" value ="提交" />
</div>
</form>
</body>
</html>
学习新手,请多指教。 --------------------编程问答-------------------- <%@ Page Language="VJ#" %>
改成
<%@ Page Language="C#" %>
补充:.NET技术 , ASP.NET