Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Repeater not found in C# codebehind

Reply
Thread Tools

Repeater not found in C# codebehind

 
 
Jon
Guest
Posts: n/a
 
      01-13-2005
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
 
Reply With Quote
 
 
 
 
Peter Rilling
Guest
Posts: n/a
 
      01-13-2005
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) 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



 
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
C#/ASP.Net Codebehind type not found at run-time Randall Parker ASP .Net 1 10-19-2005 09:10 AM
Binding to a Repeater in Codebehind...a little confusion. nobody@somewhere.com ASP .Net 2 03-22-2005 06:15 AM
Help: PageDataSource, Repeater and Codebehind function... =?Utf-8?B?Um95?= ASP .Net 2 01-11-2005 09:33 PM
Help! Having trouble calling codebehind function from repeater results! Kent P. Iler ASP .Net Datagrid Control 0 03-07-2004 11:04 PM
Help! Having trouble calling codebehind function from repeater results! Kent P. Iler ASP .Net 0 03-07-2004 11:04 PM



Advertisments