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 515
1 Maciej Los 340
2 Richard MacCutchan 265
3 BillWoodruff 225
4 Mathew Soji 155
0 OriginalGriff 8,804
1 Sergey Alexandrovich Kryukov 7,457
2 DamithSL 5,689
3 Maciej Los 5,279
4 Manas Bhardwaj 4,986


Advertise | Privacy | Mobile
Web04 | 2.8.1411028.1 | Last Updated 29 Mar 2013
Copyright © CodeProject, 1999-2014
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