473,403 Members | 2,359 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,403 software developers and data experts.

'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="newPosting">
<span class="newPostingCategory">
<Script Runat="Server">
dim applicationType as string = DataBinder.Eval(Container.DataItem,
"Application")
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 1466
It sounds to me like you did't bind any data to the repeater control.

Neil

"darrel" <no*****@hotmail.com> wrote in message news:<#S**************@TK2MSFTNGP11.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="newPosting">
<span class="newPostingCategory">
<Script Runat="Server">
dim applicationType as string = DataBinder.Eval(Container.DataItem,
"Application")
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
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...
2
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...
8
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
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
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
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...
4
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
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,...
1
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...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
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,...
0
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...
0
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.