BC30456, Compiler says something I defined is not a member of my aspx page

E

ericw3

I am switching from Java to the .Net framework.

In order to separate page layout design from the application code, I
studied the codebehind tutorial by John at
http://www.asp101.com/articles/john/codebehindnovs/default.asp

In my GetQueryResult.aspx, I defined a DataGrid as follows:

<asp:DataGrid ID ="dgQueryResults" runat="server"
AllowPaging="True"
PageSize="20"
PagerStyle-Mode="NumericPages"
PagerStyle-HorizontalAlign="Right"
OnPageIndexChanged="dgQueryResult_Page"
BorderColor="black"
BorderWidth="1"
GridLines="Both"
CellPadding="3"
CellSpacing="0"
HeaderStyle-BackColor="#aaaadd"
AlternatingItemStyle-BackColor="#eeeeee" />

And in a VB file separate from GetQueryResult.aspx, I have:

Public Class QueryResult

Sub dgQueryResult_Page(sender As System.Object, _
e As
System.Web.UI.WebControls.DataGridPageChangedEventArgs)
dgQueryResults.CurrentPageIndex = e.NewPageIndex
Call BindData(dgQueryResults)
End Sub

Sub BindData(dgDataGrid As System.Web.UI.WebControls.DataGrid)
'// I defined BindData Sub here and it works great.
End Sub
End Class

But, when I check out the GetQueryResult.aspx page from the browser, I
get the following error message:

Compiler Error Message: BC30456: 'dgQueryResult_Page' is not a member
of 'ASP.query_results_aspx'.

I don't understand this. I do have dgQueryResult_Page defined in the
class. Any idea about what is going on? Thanks.
 
E

ericw3

Hmm, looks like this is a tough question which baffled quite many
professional developers on board. :)
 
B

Bruce Barker

what does you page directive look like? do you have the aspx page inherit
from the codebehind?

-- bruce (sqlwork.com)
 
E

ericw3

Hi, thanks.

Yes, I have in the aspx page:

src="QueryResults.vb"
Inherits = "QueryResults.vb"

Hmm, it probably should be Inherits="QueryResults" instead.

I'll try it out tomorrow, Friday.
 
Joined
Sep 11, 2009
Messages
1
Reaction score
0
Error BC30456 is giving me fits...

Hello Everyone... I have been frustrated for 12 hours because while trying to get a master.aspx formatting issue to go away, I started to get a message complaining that one of my member functions is not a "member" of one of my class files.
It's a messaging class that runs during a "modal window call" but it fails right at the beginning now with BC30456 'messages' not a member of "MyClasses".

I've recompiled the dll that contains the classes, and the Messages function actually shows up in the Object Browser, but for some reason, it hates this one function.
The messages is called Messages.vb and it's contained in the MyClasses directory which is compiled into the MyClasses.dll file which is in the Bin Directory of the MyWebApp solution.
The solution is called from the Default site on an IIS server. We're using .Net 2.0 for particular reasons.
Anyone seen a situation where all of a sudden, one class get's excluded from a project for no reason like this? I may have done something odd with the configuration of the IIS server by mistake. I was playing with the overall site name, but I backed out all changes, and the issue even popped up with a sister site that was on the server.
Could it be that some trace file is stuck and for some reason it won't allow the class to be used? It can't be the name, because I renamed it and deployed and it can't find the new named file either "msgs"....
I've backed out the code, made changes, even removed the call
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,262
Messages
2,571,058
Members
48,769
Latest member
Clifft

Latest Threads

Top