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