By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,952 Members | 959 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,952 IT Pros & Developers. It's quick & easy.

Repeater not found in C# codebehind

P: n/a
Jon
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
Nov 19 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
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" <ca********@hotmail.com> wrote in message
news:f5**************************@posting.google.c om...
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

Nov 19 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.