<SPAN id="msg1">
<table cellSpacing="0" cellPadding="0" border="0">
<tr>
<td><img src="2005122214372564490.jpg"></td>
</tr>
</table>
</SPAN><SPAN id="msg2" style="display:none">
<table cellSpacing="0" cellPadding="0" border="0">
<tr>
<td><img src="2005122214372564491.jpg"></td>
</tr>
</table>
</SPAN><SPAN id="msg3" style="display:none">
<table cellSpacing="0" cellPadding="0" border="0">
<tr>
<td><img src="2005122214372564492.jpg"></td>
</tr>
</table>
</SPAN>
<table cellSpacing="0" cellPadding="0" border="0">
<tr>
<td><img src="2005122214372564490.jpg"></td>
</tr>
</table>
</SPAN><SPAN id="msg2" style="display:none">
<table cellSpacing="0" cellPadding="0" border="0">
<tr>
<td><img src="2005122214372564491.jpg"></td>
</tr>
</table>
</SPAN><SPAN id="msg3" style="display:none">
<table cellSpacing="0" cellPadding="0" border="0">
<tr>
<td><img src="2005122214372564492.jpg"></td>
</tr>
</table>
</SPAN>
<ItemTemplate>
<SPAN id='msg<%# Container.ItemIndex+1 %>'>
<table cellSpacing="0" cellPadding="0" border="0">
<tr>
<td><img src='200512221437256449<%# Container.ItemIndex %>.jpg'></td>
</tr>
</table>
</SPAN></ItemTemplate>
</asp:Repeater>
我想要的是第一个span后面没有style,后面的都要有style="display:none"
<SPAN id="msg1">
<SPAN id="msg2" style="display:none">
<ItemTemplate>
<SPAN id='msg<%# Container.ItemIndex+1 %>' <%# (Container.ItemIndex+1)>1?"style='display:none'>":"" >
<table cellSpacing="0" cellPadding="0" border="0">
<tr>
<td><img src='200512221437256449<%# Container.ItemIndex %>.jpg'></td>
</tr>
</table>
</SPAN></ItemTemplate>
</asp:Repeater>
//****后台代码为
public string DispalyStyle(int optype)
{
return optype==1?"":"style=dispaly:none";
}//****调台调用就可以了三