Repeater not found in C# codebehind

Discussion in 'ASP .Net' started by Jon, Jan 13, 2005.

  1. Jon

    Jon Guest

    hi,

    "The type or namespace of 'Repeater1' could not be found..." when I try and
    bind a repeater in the Page_Load event using Repeater1.DataSource = table etc.

    It's all basic stuff copied from a book. The only reason I'm posting is that
    the page class inherits from another one which is based on System.Web.UI.Page.

    i.e. page.aspx -> page.aspx.cs (inherits websearch)
    websearch.cs - class inherits from System.Web.UI.Page.

    This allows me to use a standard library in every page that inherits from the
    websearch class but still access all the Page objects in the codebehind.

    *But* is there something I need to add to reference aspx objects like my
    repeater? BTW my page can access all my class properties etc.

    thanks,

    Jon
    Jon, Jan 13, 2005
    #1
    1. Advertising

  2. Make sure that you have a protected member variable that you can access.
    Using server-side controls requires both the HTML and a variable that can be
    referenced in code. Sometimes the IDE does not include the variable in the
    code-behind.

    "Jon" <> wrote in message
    news:...
    > hi,
    >
    > "The type or namespace of 'Repeater1' could not be found..." when I try

    and
    > bind a repeater in the Page_Load event using Repeater1.DataSource = table

    etc.
    >
    > It's all basic stuff copied from a book. The only reason I'm posting is

    that
    > the page class inherits from another one which is based on

    System.Web.UI.Page.
    >
    > i.e. page.aspx -> page.aspx.cs (inherits websearch)
    > websearch.cs - class inherits from System.Web.UI.Page.
    >
    > This allows me to use a standard library in every page that inherits from

    the
    > websearch class but still access all the Page objects in the codebehind.
    >
    > *But* is there something I need to add to reference aspx objects like my
    > repeater? BTW my page can access all my class properties etc.
    >
    > thanks,
    >
    > Jon
    Peter Rilling, Jan 13, 2005
    #2
    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. Kent P. Iler
    Replies:
    0
    Views:
    610
    Kent P. Iler
    Mar 7, 2004
  2. =?Utf-8?B?Um95?=
    Replies:
    2
    Views:
    3,135
    =?Utf-8?B?Um95?=
    Jan 11, 2005
  3. Replies:
    2
    Views:
    1,036
  4. Randall Parker
    Replies:
    1
    Views:
    1,944
    Islamegy®
    Oct 19, 2005
  5. Kent P. Iler
    Replies:
    0
    Views:
    172
    Kent P. Iler
    Mar 7, 2004
Loading...

Share This Page