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

Discussion in 'ASP .Net' started by ericw3@gmail.com, Feb 2, 2006.

  1. Guest

    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.
     
    , Feb 2, 2006
    #1
    1. Advertising

  2. Guest

    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/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.
     
    , Feb 2, 2006
    #2
    1. Advertising

  3. Bruce Barker Guest

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

    -- bruce (sqlwork.com)

    <> wrote in message
    news:...
    > 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/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.

    >
     
    Bruce Barker, Feb 2, 2006
    #3
  4. Guest

    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:...
    > > 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/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.

    > >
     
    , Feb 2, 2006
    #4
  5. picals

    Joined:
    Sep 11, 2009
    Messages:
    1
    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
     
    picals, Oct 2, 2009
    #5
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. TN Bella
    Replies:
    2
    Views:
    2,312
    TN Bella
    Jun 20, 2004
  2. Zenobia
    Replies:
    1
    Views:
    7,302
    Zenobia
    Jul 6, 2004
  3. =?Utf-8?B?TW9oYW1tZWQgQmFuYXQ=?=

    BC30456: 'InitializeCulture' is not a member of Page

    =?Utf-8?B?TW9oYW1tZWQgQmFuYXQ=?=, Mar 7, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    13,708
    =?Utf-8?B?TWF1cmljaW8gUGlyZXM=?=
    Apr 11, 2006
  4. Tony Girgenti
    Replies:
    7
    Views:
    2,594
    Ken Cox [Microsoft MVP]
    Oct 5, 2006
  5. Tony Girgenti
    Replies:
    7
    Views:
    256
    Ken Cox [Microsoft MVP]
    Oct 5, 2006
Loading...

Share This Page