重新获得ASP .NET主页上按钮的单击事件 [英] Reagarding button's click event on ASP .NET master page
本文介绍了重新获得ASP .NET主页上按钮的单击事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
Compilation Error
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: CS1061: 'ASP.masterpage_master' does not contain a definition for 'loginbtn_Click' and no extension method 'loginbtn_Click' accepting a first argument of type 'ASP.masterpage_master' could be found (are you missing a using directive or an assembly reference?)
Source Error:
Line 237: <br />
Line 238: <br />
Line 239: <asp:Button ID="loginbtn" runat="server" CssClass="logInButtonStyle"
Line 240: Text="Log In" OnClick="loginbtn_Click" />
Line 241: <br />
///////////////////////////////////
尽管我已经为Click事件编写了代码,但在运行时却遇到了此类错误...
欢迎所有建议...:)
/////////////////////////////////////////////////
Though I''ve written code for Click event, I''m getting this kinda error while runtime...
All the suggestions are welcomed... :)
推荐答案
错误说明了一切.似乎对MasterPages的使用不正确.
阅读,学习和尝试:
MSDN:ASP.NET母版页 [ ASPNET:ASP.NET母版页教程 [ ASP.NET 2.0主页 [
Error speaks all. Looks like incorrect usage of MasterPages.
Read, learn and try:
MSDN: ASP.NET Master Pages[^]
ASPNET: ASP.NET Master Pages Tutorials[^]
ASP.NET 2.0 Master Pages[^]
请尝试注释完整的事件处理程序并从中重新创建事件处理程序双击按钮进入设计器窗口.
Please try commenting the complete event handler and recreate the event handler from the designer window by double clicking the button.
这篇关于重新获得ASP .NET主页上按钮的单击事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文