Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: ASP.NET
<Columns>
                    <asp:TemplateField HeaderText="Week Start Date">
                     <ItemTemplate>
                            <asp:Label runat="server" ID="lblweek"  Text='<%#Eval("WeekDate") %>'  Width="120"  />
                        </ItemTemplate>
 

 

                    </asp:TemplateField>
                     <asp:TemplateField HeaderText="Mon" >
                     <ItemTemplate>
                            <asp:Label runat="server" ID="lblmon" Text='<%#Eval("Mon") %>'  Width="70" />
                        </ItemTemplate>
 

                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Tue">
                     <ItemTemplate>
                            <asp:Label runat="server" ID="lbltue" Text='<%#Eval("Tue") %>'  Width="70" />
                        </ItemTemplate>
 

 
</asp:TemplateField>
<asp:TemplateField HeaderText="Wed">
                     <ItemTemplate>
                            <asp:Label runat="server" ID="lblweek" Text='<%#Eval("Wed") %>' Width="70" />
                        </ItemTemplate>
 
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Thu">
                     <ItemTemplate>
                            <asp:Label runat="server" ID="lblthu" Text='<%#Eval("Thu") %>' Width="70"/>
                        </ItemTemplate>
 
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Fri">
                     <ItemTemplate>
 
                            <asp:Label runat="server" ID="lblfri" Text='<%#Eval("Fri") %>' Width="70"/>
                        </ItemTemplate>
 
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Sat">
                     <ItemTemplate>
                            <asp:Label runat="server" ID="lblsat" Text='<%#Eval("Sat") %>' Width="70"/>
                        </ItemTemplate>
 
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Sun">
                     <ItemTemplate>
                            <asp:Label runat="server" ID="lblsun" Text='<%#Eval("Sun") %>' Width="70"/>
                        </ItemTemplate>
 
                    </asp:TemplateField>
        <asp:TemplateField HeaderText="TotalHours">
                      <ItemTemplate>
                    <asp:Label runat="server" ID="lblWeekTotalHrs" Text='<%# Convert.ToDecimal(Eval("Mon")) + Convert.ToDecimal(Eval("Tue")) + Convert.ToDecimal(Eval("Wed")) + Convert.ToDecimal(Eval("Thu")) + Convert.ToDecimal(Eval("Fri")) + Convert.ToDecimal(Eval("Sat")) + Convert.ToDecimal(Eval("Sun"))%>' Width="70"/>
 
                </ItemTemplate>
            </asp:TemplateField>
 
                    <asp:TemplateField HeaderText="Leavehours">
                     <ItemTemplate>
                            <asp:Label runat="server" ID="lblLeavehours" Text='<%#Eval("Leavehours") %>'  Width="100"/>
                        </ItemTemplate>
 
                    </asp:TemplateField>
 
                    <asp:TemplateField HeaderText="OT">
                     <ItemTemplate>
                            <asp:Label runat="server"   ID="lblOT" Text='<%#Eval("OT") %>'  Width="100"/>
                        </ItemTemplate>
 
                    </asp:TemplateField>
                   <asp:TemplateField>
                    <ItemTemplate>
                        <asp:HyperLink runat="server" NavigateUrl='<%#Eval("AttachmentPath") %>' Text="Download" Target="_blank"  />
                    </ItemTemplate>
                   </asp:TemplateField>
                    <%--  <asp:HyperLinkField DataTextField="AttachmentPath" HeaderText="Download" Target="_blank" Text="Download"
             NavigateUrl='<%#Eval("AttachmentPath") %>'  /> --%>
 

            </Columns>

		
Posted 28-Mar-13 23:57pm

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

You have given a 'Hyperlink' control and hence you get a text for download. Give an image button or an image wrapped in a-href to have an icon that triggers an event on click.
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 512
1 Maciej Los 445
2 Sergey Alexandrovich Kryukov 381
3 CPallini 170
4 PIEBALDconsult 148
0 Sergey Alexandrovich Kryukov 6,708
1 OriginalGriff 5,302
2 Peter Leow 3,837
3 Mika Wendelius 2,850
4 CHill60 2,748


Advertise | Privacy | Mobile
Web04 | 2.8.150224.1 | Last Updated 29 Mar 2013
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100