我现在想用ASP.NET Web Application编写个小的程序,试下SP1补丁,写了一个网页,上面就button按钮,一个Label,一个RadioButtonList,实现的功能如下:
protected void Button1_Click(object sender, EventArgs e)
{
Label1.Text = RadioButtonList1.SelectedValue.ToString();
}
但是在debug(F5)的时候,调出的网页在报错,如下
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: CS0426: The type name 'WebForm2' does not exist in the type 'System.Web.UI.WebControls.CheckBox'
Source Error:
Line 112: public webform2_aspx() {
Line 113: string[] dependencies;
Line 114: ((CheckBox.WebForm2)(this)).AppRelativeVirtualPath = "~/WebForm2.aspx";
Line 115: if ((global::ASP.webform2_aspx.@__initialized == false)) {
Line 116: dependencies = new string[1];
Source File: c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\5dcce09d\1a79a36\App_Web_webform2.aspx.cdcab7d2._t1a-fyd.0.cs Line: 114
各位高手给指点下这是什么原因?
PS:用ASP.NET Web Site建立就不会出现这样的问题
------解决方案--------------------------------------------------------
'System.Web.UI.WebControls.CheckBox' 你没有引用
------解决方案--------------------------------------------------------
你看看页面设计头(是页面设计里面)头上是不是有如果的reg的头?