ASP petit problème à propos sur une boucle if
Bonjour à tous,
Je suis novice en ASP, je viens seulement de débuter, lors de mon stage il m'est demandé de reprendre des programmes en asp et j'ai un petit problème.
voici mon problème:
voilà le code:
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
| <table border="0" cellpadding="2" cellspacing="2" align="center" width="100%" borderColor="#adc3de">
<tr>
<td colspan="2" align="center" bgColor="#adc3de">
<b>
<%
If pt.item(1).PointAttributes("pointSource").Value = "Z" Then
'microZ
Response.Write("INFOS µZ sur " & pt.item(1).name)
Else
Response.Write("INFOS Foxboro sur " & pt.item(1).name)
'If pt.item(1).PointAttributes("pointSource").Value = "C" Or pt.item(1).PointAttributes("pointSource").Value = "K" Or pt.item(1).PointAttributes("pointSource").Value = "Lab" Then
' Response.Write("INFOS sur " & pt.item(1).name)
'Else
'
' If pt.item(1).PointAttributes("pointSource").Value = "F" Then
' Response.Write("INFOS Foxboro sur " & pt.item(1).name)
' Else
'
' If pt.item(1).PointAttributes("pointSource").Value = "O" Then
' Response.Write("INFOS OPC sur " & pt.item(1).name)
' Else
'
' If pt.item(1).PointAttributes("pointSource").Value = "P" Then
' Response.Write("INFOS PI To PI sur " & pt.item(1).name)
' Else
'
' If pt.item(1).PointAttributes("pointSource").Value="M" Then
' Response.Write("INFOS Modbus sur " & pt.item(1).name)
' End if
'
' End if
'
' End if
'
' End if
'
'End if
End if
%></b>
</td>
</tr> |
le problème est que je veux afficher i"nfos microZ" si le pointSource est Z sinon je veux "infos foxboro" mais le souci est que le programme ne prend pas en compte le else donc il écrit "infos microZ qd c'est le cas sinon il m'est rien autrement.
:bug:
est ce que quelqu'un peut m'aider SVP???
Merci d'avance à ceux qui veulent bien m'aider...
nicodu59.
---------
Utilise la balise code (#) la prochaine fois quand tu mets du code dans la page c'est fait pour ça la balise ;)