What is the correct Condition (IF...THEN) with Data Repeater ?

K

kelvinweb

Hi All,

My Source Code is the following
<ItemTemplate>
<tr>
<td width="100" align="right"><font size="2" face="Verdana, Arial,
Helvetica, sans-serif">&nbsp;</font></td>
<%IF #Container.DataItem("LINE53")<>2 THEN%>
<td width="300" colspan="3"><font size="2" face="Verdana, Arial,
Helvetica,
sans-serif"><b>Line&nbsp;<%#Container.DataItem("LINE53")%></b></font></td>
<%END IF%>
</tr>
</ItemTemplate>

I got the error:
Compiler Error Message: BC30201: Expression expected.

Not uses '#'
Compiler Error Message: BC30451: Name 'Container' is not declared.

Please Help.
 
E

Eliyahu Goldin

No, you don't do it in this way. You should handle ItemDataBound event to
check the values in the data items and set the visual properties of your
template elements.

Eliyahu
 
Joined
Aug 6, 2009
Messages
3
Reaction score
0
Not sure if this is the correct topic to post this into but if not and you could advise me to the correct topic!

Could anyone assist me with the below please? I am very much a noobie!



Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

Compiler Error Message: BC30455: Argument not specified for parameter 'Find' of 'Public Function Replace(Expression As Object, Find As String, Replacement As String, [Start As Long = 1], [Count As Long = -1], [Compare As Microsoft.VisualBasic.CompareMethod = CompareMethod.Text]) As String'.

Line 97: ToSend.Add("cboType", "1")

Line 98: ToSend.Add("txtDuration", Values("Field74"))
Line 99: ToSend.Add("txtJobTitle", fixword(Replace(Replace(Values.Common.JobTitle), "£", "GBP"), "–", "-"))
Line 100: ToSend.Add("cboSector", Values("Field1002"))
Line 101: ToSend.Add("optForGrad", Values("Field1012"))



Source File: E:\InetPub\wwwroot\ServerApps\MultipostEngine\TemplateCache\Templates\Template105.aspx
Line: 99

very confused and not sure what i am doing wrong...

Thanks in advance!
 

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

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top