日期:2014-05-20  浏览次数:20922 次

Repeater1中的根据字段不同值显示不同链接??
     <asp:Repeater ID="Repeater1" runat="server" ondatabinding="Repeater1_DataBinding" 
            onitemdatabound="Repeater1_ItemDataBound">
        <HeaderTemplate>
        <table width="100%"  border="0" cellpadding="1" cellspacing="1" style="background-color:Gray"  height:141;">
        <tr style="background-color:White; height:25px; background-image:url(images/ps.png)" align=center>
        <td width="60">问题类型</td><td width="60">来源</td>
        <td>标题</td>
        <td width="60">阅读次数</td><td width="60">回复次数</td>
        <td width="60">评估次数</td><td width="160"></td></tr>
                    </HeaderTemplate>
        <ItemTemplate>
        <tr style="background-color:White" >
        <td><%#DataBinder.Eval(Container.DataItem,"FTypeid") %></td>
        <td><%#DataBinder.Eval(Container.DataItem,"FSourceID") %></td>
        
        <td >
           <a href="javascript:makeNewWindow('AskRead.aspx?AskID=<%# DataBinder.Eval(Container.DataItem,"FAskID") %>&AskTitle=<%#DataBinder.Eval(Container.DataItem,"Ftitle") %>')"> <%# DataBinder.Eval(Container.DataItem,"FTitle") %> </a>
          </td>
           <td align=center>
            <font color="red"><%# DataBinder.Eval(Container.DataItem, "FReadCount")%></font></td>
            <td align=center><%#DataBinder.Eval(Container.DataItem,"回复次数") %></td>
            <td align=center><%#DataBinder.Eval(Container.DataItem,"评估次数") %></td>
            <td align=center>
             这里如何在前面回复次数为1时,显示为查看,同是href地址也变化??               
<a href="javascript:makeNewWindow('AskRead.aspx?AskID=<%# DataBinder.Eval(Container.DataItem,"FAskID") %>&AskTitle=<%#DataBinder.Eval(Container.DataItem,"Ftitle") %>')">回复</a>
                &nbsp;&nbsp;
              <a href="javascript:window.open('AskRead.aspx','','width=800,height=300')">评估</a>
                &nbsp;&nbsp;