PageRenderTime 27ms CodeModel.GetById 24ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/pigeoncms/Controls/DocsDownloadControl.ascx

http://pigeoncms.googlecode.com/
ASP.NET | 54 lines | 50 code | 4 blank | 0 comment | 3 complexity | a124a0e64f38b932a95d9d6871342dd2 MD5 | raw file
 1<%@ Control Language="C#" AutoEventWireup="true" CodeFile="DocsDownloadControl.ascx.cs" Inherits="Controls_DocsDownloadControl" %>
 2<script language="javascript" type="text/javascript">
 3// <!CDATA[
 4
 5function ShowAndHide(divId){
 6    if(document.getElementById)
 7    {
 8        var el1 = document.getElementById(divId);
 9        if(el1.style.display != "none")
10            el1.style.display="none";
11        else
12            el1.style.display="block";
13    }
14}
15
16// ]]>
17</script>
18<span class="controlTitle"><asp:Literal ID="LitPageTitle" runat="server"></asp:Literal></span><br />
19<br />
20<table cellpadding="4" cellspacing="0">
21<asp:Repeater ID="Repeater1" OnItemDataBound="Repeater1_ItemDataBound" runat="server" DataSourceID="ObjDs1">
22    <ItemTemplate>
23    <tr>
24        <td>
25            <asp:HyperLink ID="LnkDownload" runat="server">
26                <asp:Image ID="ImgDownload" runat="server" SkinID="ImgDownload" AlternateText="Download File" Visible="true" ToolTip="Download file" />
27            </asp:HyperLink>
28        </td>
29        <td style="text-align:left"><asp:Label ID="LblName" runat="server"></asp:Label></td>
30        <td style="text-align:left">
31            <a href="#" class="boxInfo" onclick="ShowAndHide('Div<%#DataBinder.Eval(Container.DataItem, "DocId") %>')">
32            info
33            </a>
34        </td>
35    </tr>
36    <tr>
37        <td colspan="4">
38        <div id="Div<%#DataBinder.Eval(Container.DataItem, "DocId") %>" style="display:none;" class="boxInfo">
39        <%#DataBinder.Eval(Container.DataItem, "Description") %>
40        </div>         
41        </td>
42    </tr>
43    </ItemTemplate>
44</asp:Repeater>
45</table>
46
47<asp:ObjectDataSource ID="ObjDs1" runat="server" SortParameterName="sort"
48    SelectMethod="GetDocsByFilter" TypeName="PigeonCms.DocumentsManager" OnSelecting="ObjDs1_Selecting">
49    <SelectParameters>
50        <asp:Parameter Name="filter" Type="Object" />
51        <asp:Parameter Name="sort" Type="String" />
52    </SelectParameters>
53</asp:ObjectDataSource>
54