2014-05-10 299 views
-1

我发现了编译器错误消息:CS1061:编译器错误消息:CS1061

“ASP.rinatup_registrationforms_aspx”不包含关于“CheckBox1_CheckedChanged”的定义和没有扩展方法“CheckBox1_CheckedChanged”接受类型的第一参数' ASP.rinatup_registrationforms_aspx”可以找到(是否缺少using指令或程序集引用?)

RegistrationForms.aspx

<asp:CheckBox ID="AnotherMahzorCheckBox" runat="server" AutoPostBack="True" 
Font-Size="Large" ForeColor="Red" Text="Sign up" 
OnCheckedChanged="CheckBox1_CheckedChanged" Visible="False" /> 

个RegistrationForms.aspx.cs

protected void CheckBox1_CheckedChanged(object sender, EventArgs e) 
    { 
     // The user selected to register his child for another Mahzor 
     string s = this.NewCourseRadioButtonList.SelectedValue; 
     Page.ClientScript.RegisterStartupScript(this.GetType(), "myScript", "showPanel();", true); 
     this.NewCourseRadioButtonList.SelectedValue = s; 
     Page.ClientScript.RegisterStartupScript(this.GetType(), "myScriptB", "showSecondPanel();", true); 
     AnotherMahzorCheckBox.Visible = false; 
     LocationPanelB.Focus(); 

    } 

帮助?

+0

如果我的解决方案为您工作,请将其标记为答案,以便其他人知道它的工作原理 – qamar

回答

1

你需要做的是清理你的pagename.aspx设计器文件。打开设计器文件并清除其中的所有内容。那么你需要做的是在aspx页面中改变一些东西。这将确保新的设计器代码生成,因此你不应该再有这个问题了。