If statements in aspx pages

G

Guest

What is wrong with the following if statement in my aspx page?

<%If #DataBinder.Eval(Container.DataItem, "locationType") <> "T" Then%>

I get error that says: BC30201: Expression expected.
 
G

Guest

Try

<%# Iff(DataBinder.Eval(Container.DataItem, "locationType") <> "T",
True_Part, False_part) %>

HTH

Elton Wang
(e-mail address removed)
 
G

Guest

Actually I mean

<%# IIf(DataBinder.Eval(Container.DataItem, "locationType") <> "T",
True_Part, False_part) %>

Elton
 
B

Bruce Barker

binding expressions can not be used in statement block <% %>, just as
statements can not be used in a binding expression block <%# %>

-- bruce (sqlwork.com)
 
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
474,141
Messages
2,570,817
Members
47,365
Latest member
BurtonMeec

Latest Threads

Top