Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > BC30456, Compiler says something I defined is not a member of my aspx page

Reply
Thread Tools

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

 
 
ericw3@gmail.com
Guest
Posts: n/a
 
      02-02-2006
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/...vs/default.asp

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

<aspataGrid 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.DataGridPageChangedEvent Args)
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.

 
Reply With Quote
 
 
 
 
ericw3@gmail.com
Guest
Posts: n/a
 
      02-02-2006
Hmm, looks like this is a tough question which baffled quite many
professional developers on board.

wrote:
> 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/...vs/default.asp
>
> In my GetQueryResult.aspx, I defined a DataGrid as follows:
>
> <aspataGrid 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.DataGridPageChangedEvent Args)
> 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.


 
Reply With Quote
 
 
 
 
Bruce Barker
Guest
Posts: n/a
 
      02-02-2006
what does you page directive look like? do you have the aspx page inherit
from the codebehind?

-- bruce (sqlwork.com)

<> wrote in message
news: oups.com...
> Hmm, looks like this is a tough question which baffled quite many
> professional developers on board.
>
> wrote:
>> 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/...vs/default.asp
>>
>> In my GetQueryResult.aspx, I defined a DataGrid as follows:
>>
>> <aspataGrid 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.DataGridPageChangedEvent Args)
>> 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.

>



 
Reply With Quote
 
ericw3@gmail.com
Guest
Posts: n/a
 
      02-02-2006
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.


Bruce Barker wrote:
> what does you page directive look like? do you have the aspx page inherit
> from the codebehind?
>
> -- bruce (sqlwork.com)
>
> <> wrote in message
> news: oups.com...
> > Hmm, looks like this is a tough question which baffled quite many
> > professional developers on board.
> >
> > wrote:
> >> 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/...vs/default.asp
> >>
> >> In my GetQueryResult.aspx, I defined a DataGrid as follows:
> >>
> >> <aspataGrid 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.DataGridPageChangedEvent Args)
> >> 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.

> >


 
Reply With Quote
 
picals picals is offline
Junior Member
Join Date: Sep 2009
Posts: 1
 
      10-02-2009
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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
adapter preview-data succeeds, but ASPX page says 'Cannot open database' bennett@peacefire.org ASP .Net 1 01-11-2006 04:47 AM
compiler says operator< needs exactly ONE argument (not two--why?) cayblood C++ 4 11-03-2005 02:18 AM
#if (defined(__STDC__) && !defined(NO_PROTOTYPE)) || defined(__cplusplus) Oodini C Programming 1 09-27-2005 07:58 PM
Accessing Session variables defined in ASP page in the ASPX page =?Utf-8?B?U2FjaGluIFZhaXNobmF2?= ASP .Net 7 08-17-2005 07:46 PM
Dell says no & Acronis says maybe sysprep utility ( Re: Anyone use Acronis Drive Image 7.0? Bobby Fischler Computer Support 0 07-24-2004 12:12 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57