我有一个相当复杂(> 3k 行)的经典 ASP 页面,它应该根据 CountryID 的值抑制某些部分。如果 Job 的 CountryID 是特定值,我创建了布尔变量并将它们设置为 true。初始逻辑如下:
  blnUSJob = False
  blnCanadaJob = False
  blnAUJob = False
  blnNZJob = False
  nCountryID = 0
  If GetJobCountry(nJobAd_ID) = "CA" Then
     blnCanadaJob = True
     nCountryID = 2
 End If
如果 blnCanadaJob 评估为 True,我创建了呈现的标记:
<% 
if not blnCanadaJob then 
%>      
<tr>
<td width='30%' class='StandardLight' style="background-color:#dddddd" 
    valign='middle' align='right'>
<b>For replacement positions enter the following information for previous 
    incumbent</b>
<b>Name:</b><span class="Required">nbsp;*</span> <input type="text" 
    name="txtName" class="StdFieldName" value ="<%=strName %>" size="50" maxlength = 
    "50" /><br>
</td>
</tr>
现在,我需要确保为其他 CountryID 禁止此标记。实现这一目标的最佳方法是什么?我是否应该使用特定国家/地区 ID 的评估声明重复上述标记?或者,有没有更优雅的方式来处理这个问题?
感谢您的帮助和指导。