BC30456:'btnLogin_Click'不是'ASP.default_aspx的成员 [英] BC30456: 'btnLogin_Click' is not a member of 'ASP.default_aspx

查看:436
本文介绍了BC30456:'btnLogin_Click'不是'ASP.default_aspx的成员的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用asp.net vb项目..我坚持以下错误消息..请帮帮我。

BC30456:'btnLogin_Click'不是'ASP.default_aspx'的成员。

解决方案

但是对于虚拟解决方案检查

在您的应用程序上,错误是由Inherits标记引起的。您的两个子表单可能都是相同的Inherits_Default。然后换一个...

注意:你必须更改.aspx和

相关的.vb文件中的Inherits标签

例如.aspx:
<![CDATA [<%@ Page Language =VBMasterPageFile =〜/ Principal.master
AutoEventWireup =falseCodeFile = InventaireAccessoire.aspx.vb
Inherits =_ Default2title =InventaireAccessoire%>]]>

例子.vb:
部分类_Default2
继承System.Web.UI.Page


检查如果您的Asp页面有一个名为btnLogin的按钮。


使用下面的示例检查您的代码:



in html content or .aspx



< asp:Button ID =   cmdGet runat =   server Text =  查看 CssClass =   uiButton OnClick =   cmdGet_Click高度=   21px宽度=   50px /> 





这是代码隐藏或.c s


 受保护  void  cmdGet_Click( object  sender,EventArgs e)
{
// 你的代码在这里
}





如果还是你遇到问题,发布你的.aspx和.cs代码,这将有助于我们更好地了解你的问题,如果我们还没有:)



为激情编码。 ..


I am working asp.net vb project.. i m stuck with following error message.. please help me.
BC30456: 'btnLogin_Click' is not a member of 'ASP.default_aspx'.

解决方案

But for dummy solution Check
On your application the error was cause by the Inherits tag. Both of your child forms may the same Inherits "_Default". Then change one ...
Note: You have to change the Inherits tag in the .aspx and in the
related .vb files

Exemple .aspx :
<![CDATA[<% @ Page Language ="VB" MasterPageFile="~/Principal.master"
AutoEventWireup ="false" CodeFile="InventaireAccessoire.aspx.vb"
Inherits="_Default2" title="InventaireAccessoire" %>]]>

Exemple .vb :
Partial Class _Default2
Inherits System.Web.UI.Page


Check if your Asp page has a button by the name btnLogin.


Check in your code with the sample below:

This goes in html content or .aspx

<asp:Button ID="cmdGet" runat="server" Text="View" CssClass="uiButton" OnClick="cmdGet_Click" Height="21px" Width="50px" />



This goes in code behind or .cs

protected void cmdGet_Click(object sender, EventArgs e)
{
         //your code goes here
}



If still you face problem, post your .aspx and .cs code that will help us to understand your problem better if we haven't yet:)

"Coding for passion..."


这篇关于BC30456:'btnLogin_Click'不是'ASP.default_aspx的成员的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆