misho
08-13-2010, 01:23 PM
Hi I have an If statement and I need to add an extra condition to it as following:
my if statement is
<%If IsDate(rs.fields("DiaryDate")) then
DiaryDate=rs.fields("DiaryDate")%>
<a href="diary/Diarynew.asp?DiaryDate=<%=DiaryDate%>"><%=rs.fields("DiaryDate")%><br><%=FormatDateTime(rs.fields("StartTime"),4)%>-<%=FormatDateTime(rs.fields("EndTime"),4)%></a>
<%Else%>
<%If IsDate(rs.fields("PaymentProcessedDate")) then%>
<a href="diary/Diarynew.asp?ty=addB&BasketId=<%=BasketID%>">Book</a>
<%Else%>
<a href="diary/Diarynew.asp?ty=addB&BasketId=<%=BasketID%>">Book (Prov)</a>
<%End if%>
now I need to identify if the field studio = Kent then display deferent link so I added this to the bottom of the code:
<% Else if IsDate(rs.fields("PaymentProcessedDate")) AND studio<>"Kent" then%>
<a href="../kent/diary/Diarynew.asp?ty=addB&BasketId=<%=BasketID%>">BookK</a>
<%Else%>
<a href="../kent/diary/Diarynew.asp?ty=addB&BasketId=<%=BasketID%>">Book K(Prov)</a>
But it doesn't work , I only need to check if the feild studio is kent then display another link. Thank you for the help
my if statement is
<%If IsDate(rs.fields("DiaryDate")) then
DiaryDate=rs.fields("DiaryDate")%>
<a href="diary/Diarynew.asp?DiaryDate=<%=DiaryDate%>"><%=rs.fields("DiaryDate")%><br><%=FormatDateTime(rs.fields("StartTime"),4)%>-<%=FormatDateTime(rs.fields("EndTime"),4)%></a>
<%Else%>
<%If IsDate(rs.fields("PaymentProcessedDate")) then%>
<a href="diary/Diarynew.asp?ty=addB&BasketId=<%=BasketID%>">Book</a>
<%Else%>
<a href="diary/Diarynew.asp?ty=addB&BasketId=<%=BasketID%>">Book (Prov)</a>
<%End if%>
now I need to identify if the field studio = Kent then display deferent link so I added this to the bottom of the code:
<% Else if IsDate(rs.fields("PaymentProcessedDate")) AND studio<>"Kent" then%>
<a href="../kent/diary/Diarynew.asp?ty=addB&BasketId=<%=BasketID%>">BookK</a>
<%Else%>
<a href="../kent/diary/Diarynew.asp?ty=addB&BasketId=<%=BasketID%>">Book K(Prov)</a>
But it doesn't work , I only need to check if the feild studio is kent then display another link. Thank you for the help