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

D

darrel

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>
 
D

darrel

It sounds to me like you did't bind any data to the repeater control.

Thanks, Niel. I'll look into that.

-Darrel
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,767
Messages
2,569,570
Members
45,045
Latest member
DRCM

Latest Threads

Top