Dúvida site feito dreamweaver em asp.net

10/06/2014

0

Tenho um site antigo que foi feito no dreamweaver em asp.net

Tenho um código que usa o Repeater para listar uns textos e adicionar um link para o mesmo.
Só que não gostaria de mostra o link para os demais textos que tem no banco, apenas para o que tem ID 1.
Como eu poderia usar um if para desviar a opção de criação do link?

Agradeço a ajuda.



   <table width="98%" border="0" cellspacing="0" cellpadding="0">
        <asp:Repeater ID="Repeater_Links" runat="server" DataSourceID="dbDadosNoticias">
        <ItemTemplate>  
        <tr> 
          <td width="4%" bgcolor="#FFFFFF"> </td>
          <td width="40%" class="formtext" bgcolor="#FFFFFF"><%#Eval("data")%></td>
          <td width="52%"> </td>
          <td width="2%"> </td>
        </tr>
        <tr> 
          <td width="4%" height="10"></td>
          <td colspan="2" width="170" height="10" class="conteudo1"></td>
          <td width="2%"  height="10"></td>
        </tr>
        <tr> 
          <td width="4%"> </td>
          <td colspan="2" width="170" class="conteudo1"><%#Eval("resumo")%><br>
          </td>
          <td width="2%"> </td>
        </tr>
        <tr> 
          <td width="4%" height="5"></td>
          <td colspan="2" height="5"></td>
          <td width="2%" height="5"></td>
        </tr>
        <tr> 
          <td width="4%" height="10"></td>
          <td width="32%" height="10"></td>
          <!--só aparecer para o ID 1 e ocultar para o restante-->
           <td width="52%" height="10" bgcolor="#FFFFFF"><a href="noticia_dtl.aspx?id=<%#Eval("id")%>" target="conteudo"><img src="images/seta.gif" border="0" width="28" height="15"><span class="formtext"> Saiba Mais</span></a></td>
           <td width="2%" height="10"></td>
        </tr>
        <tr> 
          <td width="4%" height="10"></td>
          <td width="32%" height="10"></td>
          <td width="52%" height="10"></td>
          <td width="2%" height="10"></td>
        </tr>
        </ItemTemplate>              
        </asp:Repeater>
      </table>

Itamar Souza

Itamar Souza

Responder

Assista grátis a nossa aula inaugural

Assitir aula

Saiba por que programar é uma questão de
sobrevivência e como aprender sem riscos

Assistir agora

Utilizamos cookies para fornecer uma melhor experiência para nossos usuários, consulte nossa política de privacidade.

Aceitar