2012-09-06 4 views
0

버튼을 클릭하여 이메일을 보내려면 웹 페이지 뒤에 코드를 작성하려고합니다.compilation error-vb.net not a member error

내가 텍스트 상자를 가지고

<asp:TextBox ID="txtSecEmail" runat="server" Width="189px" 
ontextchanged="txtSecEmail_TextChanged"></asp:TextBox> 

나는이 오류를

컴파일 오류 설명을 얻을 페이지를로드 할 때 나는 또한

<asp:Button ID="btnUploadFiles" runat="server" Text="Upload Files"  
    Command="Command" 
CommandArgument="CommandArgument" 
runat="server" onclick="btnUploadFiles_Click" /> 

후 버튼이 있습니다 : 이 요청을 처리하는 데 필요한 자원을 컴파일하는 중에 오류가 발생했습니다. 다음 특정 오류 정보를 검토하고 소스 코드를 적절하게 수정하십시오.

컴파일러 오류 메시지 : BC30456 : 'txtSecEmail_TextChanged'은 (는) 'ASP.datauploaddatafiles_aspx'의 구성원이 아닙니다.

Source Error: 


Line 94:    <td> 
Line 95:     &nbsp;&nbsp; EMAIL ADDRESS: 
Line 96:     <asp:TextBox ID="txtSecEmail" runat="server" Width="189px" 
Line 97:      ontextchanged="txtSecEmail_TextChanged"></asp:TextBox> 
Line 98:    </td> 

소스 파일 : Y : \ PROG \ NET \ 웹 \ ClientCenterNew \ datauploaddatafiles.aspx 라인 : 내가 그것을 구성원이 아닌 방법을 이해 해달라고 96

? 왜이 말을하는거야?

답변

0

코드 숨김 (datauploaddatafiles.aspx.vb)에서 txtSecEmail_TextChanged 메서드를 찾습니다. 그 서브 루틴을 코드 숨김 파일에 넣고 다시 빌드하십시오.

예 :

Protected Sub txtSecEmail_TextChanged(ByVal sender As Object, _ 
     ByVal e As System.EventArgs) Handles txtSecEmail.TextChanged 
    'Some Code 
End Sub 
+0

NoAlias는 무엇을 의미합니까? – squinny

+0

예를 들어 내 대답을 편집했습니다. – N0Alias

+0

네, 그렇습니다. 그러나 txtSecEmail.TextChanged는 handles 절에 contain 유형에 정의 된 이벤트 변수가 필요하다고 말합니다. – squinny

0

하는 실수는 클래스 이름을 변경하지 않고 페이지를 복사 할 경우 발생할 수있는 동일한 클래스 이름을 사용하여 두 개의 웹 페이지가없는 있는지 확인합니다. Visual Studio에서는이 경우 사용자가 알지 못하는 사이에 부분 클래스 뒤에 코드를 만들 수 있습니다.