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 275
1 DamithSL 265
2 CPallini 235
3 Maciej Los 185
4 George Jonsson 170
0 OriginalGriff 5,305
1 DamithSL 4,382
2 Maciej Los 3,760
3 Kornfeld Eliyahu Peter 3,470
4 Sergey Alexandrovich Kryukov 2,901


Advertise | Privacy | Mobile
Web03 | 2.8.141216.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