开发者

ASP - OR statement not working

I have the following statement which is not working, im wondering if someone could help me out and tell 开发者_如何学编程me where im going wrong

<% If ((urlFilename <> "calculators.aspx") Or (urlFilename <> "case-studies.aspx")) Then %>
    <div class="block-quote">
    </div>
<% End If %>


The code between If and End If will always fire because one of those tests will always be true.

If urlFilename = "home.aspx" both conditions are satisfied, and the code will fire.

If urlFilename = "calculators.aspx" the first condition fails, but the second is met, and the code will fire.

If urlFilename = "case-studies.aspx" the first condition is met...

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜