在网格视图中计算和显示下载

时间:2013-03-21 13:51:21

标签: c# asp.net gridview hyperlink

我有一个带有超链接的网格视图。 有没有办法计算这个超链接的点击次数?它可以计算下载文档的次数。

这就是我到目前为止......

<Columns>
            <asp:BoundField DataField="Id" HeaderText="Id" InsertVisible="False" 
                ReadOnly="True" SortExpression="Id" />

            <asp:hyperlinkfield headertext="Download File " datatextfield="FileName" datanavigateurlfields="FileName" datanavigateurlformatstring="~/Files/{0}" />

            <asp:BoundField DataField="Username" HeaderText="Username" 
                SortExpression="Username" />
            <asp:BoundField DataField="Date" HeaderText="Date" SortExpression="Date" />
            <asp:BoundField DataField="College" HeaderText="College" 
                SortExpression="College" />
            <asp:BoundField DataField="Year" HeaderText="Year" SortExpression="Year" />
            <asp:BoundField DataField="Major" HeaderText="Major" SortExpression="Major" />
            <asp:BoundField DataField="Subject" HeaderText="Subject" 
                SortExpression="Subject" />
            <asp:BoundField DataField="Downloads" HeaderText="Downloads" 
                SortExpression="Downloads" />
        </Columns>

0 个答案:

没有答案