SectionControls/DownloadList.ascx

(开头部分) 4KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

<%@ Control Language="C#" AutoEventWireup="true" CodeFile="DownloadList.ascx.cs" Inherits="SectionControls_DownloadList" %>
<%@ Register TagPrefix="cc1" Namespace="MyWebPagesStarterKit.Controls" %>
<asp:MultiView runat="server" ID="multiview">
    <asp:View runat="server" ID="editView">
        <table width="100%">
            <tr>
                <td colspan="2" align="right"><asp:Button runat="server" ID="btnNewEntry" OnClick="btnNewEntry_Click" Text="<%$ Resources:stringsRes, glb__add %>" CausesValidation="false"></asp:Button></td>
            </tr>
            <tr>
                <td colspan="2">
                    <asp:GridView runat="server" ID="gvDownloadListEdit" DataKeyNames="Guid" AutoGenerateColumns="false" OnRowCommand="gvDownloadListEdit_RowCommand" EnableViewState="false">
                        <Columns>
                            <asp:TemplateField ItemStyle-Width="25px"><ItemTemplate><%#getFiletypeIcon(Eval("Filename", "{0}"))%></ItemTemplate></asp:TemplateField>
                            <asp:TemplateField HeaderText="<%$ Resources:stringsRes, ctl_Downloadlist_Title%>"><ItemTemplate><a href="<%#getDownloadLink(Eval("Filename", "{0}"))%>"><%#buildTitle(Eval("Title", "{0}"), Eval("Filename", "{0}")) + " (" + Eval("Size") + ")"%></a></ItemTemplate></asp:TemplateField>
                            <asp:ButtonField ItemStyle-Width="40px" ButtonType="Link" ControlStyle-CssClass="btnEdit" CommandName="entry_edit" CausesValidation="false" />
                            <asp:ButtonField ItemStyle-Width="40px" ButtonType="Link" ControlStyle-CssClass="btnDelete" CommandName="entry_delete" CausesValidation="false" />
                        </Columns>
                        <RowStyle Height="25px" />
                        <HeaderStyle Height="30px" />
                    </asp:GridView>
                    <br />
                    <cc1:Pager runat="server" ID="editPager" ControlToPage="gvDownloadListEdit"></cc1:Pager>
                </td>
            </tr>
        </table>
    </asp:View>
    <asp:View runat="server" ID="editDetailsView">
        <table width="100%">
            <tr>
                <td class="fieldlabel"><asp:Localize runat="server" Text="<%$ Resources:stringsRes, ctl_Downloadlist_Title%>"></asp:Localize></td>
                <td class="field"><asp:TextBox runat="server" ID="txtTitle"></asp:TextBox></td>
            </tr>
            <tr>
                <td></td>
                <td class="field"><asp:RequiredFieldValidator runat="server" ID="valDataRequired" ControlToValidate="filData" ErrorMessage="<%$ Resources:stringsRes, ctl_ErrorMessageMissingFile%>" Display="dynamic" SetFocusOnError="true"></asp:RequiredFieldValidator></td>
            </tr>
            <tr>
                <td class="fieldlabel"><asp:Localize runat="server" Text="<%$ Resources:stringsRes, ctl_Downloadlist_File%>"></asp:Localize></td>
                <td class="field"><asp:FileUpload runat="server" ID="filData" /></td>
            </tr>
            <tr>
                <td class="fieldlabel"><asp:Localize runat="server" Text="<%$ Resources:stringsRes, ctl_Downloadlist_Comment%>"></asp:Localize></td>
                <td class="field"><asp:TextBox runat="server" id="txtComment"></asp:TextBox></td>
            </tr>
            <tr>
                <td colspan="2" align="right">
                    <asp:Button runat="server" ID="btnCancelDetails" OnClick="btnCancelDetails_Click" Text="<%$Resources:StringsRes, glb__Cancel %>" CausesValidation="false"></asp:Button>
                    <asp:Button runat="server" ID="btnSaveDetails" OnClick="btnSaveDetails_Click" Text="<%$Resources:StringsRes, glb__Save %>" CausesValidation="true"></asp:Button>
                </td>
            </tr>
        </table>
    </asp:View>
    <asp:View runat="server" ID="readonlyView">
        <asp:GridView runat="server" ID="gvDownloadList" DataKeyNames="Guid" AutoGenerateColumns="false" OnRowCommand="gvDownloadListEdit_RowCommand" EnableViewState="false">
            <Columns>
                <asp:TemplateField ItemStyle-Width="25px">
                    <ItemTemplate>
                        <div class="downloaditem"><%#getFiletypeIcon(Eval("Filename", "{0}"))%></div>
                    </ItemTemplate>
                </asp:TemplateField>
后面还有 14 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。