473,549 Members | 2,346 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

'Container' is not declared' error...am I missing a class?

I'm using a repeater control. I need the itemtemplate to be slightly
different depending on the data, so I thought I'd use a select/case
statement. Unfortunately, I'm getting a 'Container' is not declared error
(5th line, below). Why? Is it because I'm not importing a needed class? Am I
using the incorrect syntax? Here's the code in question:

<ItemTemplate >
<div class="newPosti ng">
<span class="newPosti ngCategory">
<Script Runat="Server">
dim applicationType as string = DataBinder.Eval (Container.Data Item,
"Applicatio n")
select case applicationType
case = "Notice" response.write "<span class="""news"" ">Public
Notice:<br /></span>"
case = "Notice" response.write "<span class="""news"" ">Public
Notice:<br /></span>"
case = "Notice" response.write "<span class="""news"" ">Public
Notice:<br /></span>"
case else response.write "ERROR: Undefined application value in CIO
Postings tabel"
end select
</script>
</span>
</div>
</ItemTemplate>

Nov 18 '05 #1
2 1474
It sounds to me like you did't bind any data to the repeater control.

Neil

"darrel" <no*****@hotmai l.com> wrote in message news:<#S******* *******@TK2MSFT NGP11.phx.gbl>. ..
I'm using a repeater control. I need the itemtemplate to be slightly
different depending on the data, so I thought I'd use a select/case
statement. Unfortunately, I'm getting a 'Container' is not declared error
(5th line, below). Why? Is it because I'm not importing a needed class? Am I
using the incorrect syntax? Here's the code in question:

<ItemTemplate >
<div class="newPosti ng">
<span class="newPosti ngCategory">
<Script Runat="Server">
dim applicationType as string = DataBinder.Eval (Container.Data Item,
"Applicatio n")
select case applicationType
case = "Notice" response.write "<span class="""news"" ">Public
Notice:<br /></span>"
case = "Notice" response.write "<span class="""news"" ">Public
Notice:<br /></span>"
case = "Notice" response.write "<span class="""news"" ">Public
Notice:<br /></span>"
case else response.write "ERROR: Undefined application value in CIO
Postings tabel"
end select
</script>
</span>
</div>
</ItemTemplate>

Nov 18 '05 #2
> It sounds to me like you did't bind any data to the repeater control.

Thanks, Niel. I'll look into that.

-Darrel
Nov 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
1547
by: Maitre Bart | last post by:
What I want to perform is calling a member function of container 1 (CRunner), using as argument the value of a container 2 (CNames). The purpose is to transfer values from C2 into C1 using a specific C1 member function. Both containers contains the same number of elements (or at least, C1 is larger than C2). As suggested by S. Meyers (and...
2
3628
by: Patrick Kowalzick | last post by:
Dear NG, I have two containers (standard library) which are nested, e.g.: std::vector< std::vector <int> > A; std::list< std::vector<int> > B; These structures where put in another class which I will name ComposedContainer<T> for the moment.
8
2568
by: Ken Sturgeon | last post by:
I have a button inside a panel control. Apparently I can't expect VB to respond to the button's _Click event. How do I capture the click event? Thanks Ken
4
6248
by: newbie120 | last post by:
Hi all maybe its just been a long day, but i have a question about call access modifiers in C#. Consider the following code. namespace Application { private class Class1 { int i;
10
1557
by: padulg | last post by:
Hello at all, I have a problem: I have a class named "ball" with a method named "split". This is the declaration in ball.h: class ball : public procObject { public: ball();
9
1331
by: axel22 | last post by:
Hello, I have the following problem. I create a class called MyClass which includes another class calles MyContainer. Class MyContainer has a member which is a vector, instantiated as vector<MyClass>. When trying to compile this I receive an error. Here is how it goes: --------------- MyClass.h ---------------
4
1263
by: axel22 | last post by:
Hello. The idea is to create a class MyClass which holds a container MyContainer with pointers to other instances of MyClass: --------------- MyClass.h --------------- #pragma once
2
2082
by: OuaisBla | last post by:
What I'd like to do and what I tought possible was to have a deque of string when the string was a reference (not a pointer) Then I simply tried: std::deque<std::string const &> mFifo; But, the compiler have some trouble with this at the first try. From what I know, template is a powerful mecanism an STL a well programmed library. I'm...
1
1814
by: Troy Bull | last post by:
Greetings I am trying to use a singleton to hold a group of forms. I have a MDIMaster form. I have a class called Forms; Forms is a singleton. I want to do something like the following. In MDIMaster (and other forms), I want to get an instance of Forms (the only instance). Inside Forms then there are public variables for each of the...
0
7546
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7471
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7740
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7985
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7503
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
5111
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
1
1962
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1082
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
784
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.