Click here to Skip to main content
11,647,810 members (55,877 online)
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 22: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 jyo.net 500
1 F-ES Sitecore 370
2 DamithSL 290
3 CPallini 290
4 OriginalGriff 277
0 OriginalGriff 1,342
1 jyo.net 994
2 DamithSL 971
3 Sergey Alexandrovich Kryukov 873
4 CPallini 845


Advertise | Privacy | Mobile
Web01 | 2.8.150804.4 | 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