3 つの変数のうち最も低い値を見つけて表示するコードを書きましたが、「'If' 演算子には 2 つまたは 3 つのオペランドが必要です」というメッセージが表示されます。問題が何であるかはわかりませんが、どんな助けでも大歓迎です。
<%
dim HP_RegularPayment As Integer = HP_RegularPayment
dim LPC_RegularPayment As Integer = LPC_RegularPayment
dim PCP_RegularPayment As Integer = PCP_RegularPayment
if HP_RegularPayment < LPC_RegularPayment and if HP_RegularPayment < PCP_RegularPayment then
%>
<div id="detailsprice" style="height:70px; padding-top:5px;">
£<% if DiscountPrice.Text = "" then
Response.Write(DiscountPrice.Text)
else
Response.Write(Price.Text)
end if
%><br /> <span style="font-size:12px;">Or £<%Response.Write(HP_RegularPayment) %> Per Month With HP Finance</span> </div> <%
else if LPC_RegularPayment < HP_RegularPayment and if LPC_RegularPayment < PCP_RegularPayment then
%>
<div id="detailsprice" style="height:70px; padding-top:5px;">
£<% if DiscountPrice.Text = "" then
Response.Write(DiscountPrice.Text)
else
Response.Write(Price.Text)
end if
%><br /> <span style="font-size:12px;">Or £<%Response.Write(LPC_RegularPayment) %>
Per Month With LP Finance</span> </div> <%
else if PCP_RegularPayment < HP_RegularPayment and if PCP_RegularPayment < LPC_RegularPayment then
%>
<div id="detailsprice" style="height:70px; padding-top:5px;">
£<% if DiscountPrice.Text = "" then
Response.Write(DiscountPrice.Text)
else
Response.Write(Price.Text)
end if
%><br /> <span style="font-size:12px;">Or £<%Response.Write(PCP_RegularPayment) %> Per Month With PCP Finance</span> </div> <%
else%>
<div id="detailsprice">
£<% if DiscountPrice.Text = "" then
Response.Write(DiscountPrice.Text)
else
Response.Write(Price.Text)
end if
end if%>
ありがとうルイス