0
Answer

Repeater in Asp.net

Sunny Singh

Sunny Singh

12y
2.6k
1
<asp:Repeater ID="repProjects" runat="server" OnItemCommand="repProjects_ItemCommand">
  <ItemTemplate>
  <tr id="<%#(Convert.ToInt32(((RepeaterItem)Container).ItemIndex+1)%2==0?"ContentMainRow":"ContentAlternateRow")%>">
  <td>
  <%#(((RepeaterItem)Container).ItemIndex+1).ToString()%>
  </td>
  <td>
  <%#Eval("projNote_Title") %>
  </td>
  <td>
  <%#Eval("projNote_Note") %>
  </td>
  <td>
  <%#Eval("projNote_FileAttached") %>
  </td>
  <td>
  <asp:ImageButton ID="imgBtnEdit" CommandName="Edit" ToolTip="Edit a record." CommandArgument='<%#Eval("projNote_Id") %>'
  runat="server" ImageUrl="~/resources/Images/edit.png" />
  <asp:ImageButton ToolTip="View Details." ID="imgBtnViewProjectDetails" CommandName="View"
  CommandArgument='<%#Eval("projNote_Id") %>' runat="server" ImageUrl="~/resources/Images/viewDetails_Icon.png" />
  </td>
  </tr>
  </ItemTemplate>
  </asp:Repeater>

I want if projnote_fileattached != null or space then it should display delete Button/Icon in front of file . If it is null or space then fileupload button option should be available . If user deletes file thean also user have an option to upload file

Thanx