articles_addarticle.ascx

来自「完全网站系统」· ASCX 代码 · 共 98 行

ASCX
98
字号
<%@ Control Language="C#" %>
<%@ Register TagPrefix="community" Namespace="ASPNET.StarterKit.Communities" Assembly="ASPNET.StarterKit.Communities" %>
<%--

This skin is used both for adding and editing an article. Modify the HTML content
to modify the appearance of the page.

--%>



<community:SectionTitle  CssClass="Form_Title" Runat="Server" />
<p class="Form_Description">Use this form to add or edit an article.</p>

<asp:Panel id="pnlForm" Runat="Server">

<TABLE cellSpacing="0" cellPadding="3" width="520" class="Form_Table">
  <TR>
    <TD class="Form_SectionRow">
      Article Form
    </TD>
  </TR>  
  <tr class="Form_LabelRow">
    <td >
      <span class="Form_LabelText">Title:</span> 
      <asp:RequiredFieldValidator ControlToValidate="txtTitle" Text="(Required)" Runat="Server"/><br>
      <asp:TextBox id="txtTitle" CssClass="Form_Field" columns="40" runat="server"></asp:TextBox>
    </td>
  </tr>
    <tr class="Form_LabelRow">
        <td>
        <asp:Panel id="pnlTopics" Runat="Server">
            <span class="Form_LabelText">Topic:</span> 
            <asp:RequiredFieldValidator ControlToValidate="dropTopics" Text="(required)" InitialValue="-1" CssClass="Form_Field" Runat="Server" />
            <br />
            <community:TopicPicker id="dropTopics" DefaultTopicText="Pick a Topic" runat="Server"/>
        </asp:Panel>
        </td>
    </tr>
  <tr>
    <td class="Form_LabelRow">
      <span class="Form_LabelText">Intro Text:</span>
      <span class="Form_HelpText"><br>Enter a brief description of the contents of the article</span>  
      <asp:RequiredFieldValidator ControlToValidate="txtBriefDescription" Text="(Required)" Display="Dynamic" Runat="Server"/>
      <community:LengthValidator MaxLength="300" id="valIntroText" ControlToValidate="txtBriefDescription" Text="(Your Intro is Too Long!)" Display="Dynamic" Runat="Server"/>
      <br/>
      <asp:TextBox id="txtBriefDescription" textmode="multiline" rows="4" columns="40" CssClass="Form_Field" runat="server"></asp:TextBox>
    </td>
  </tr>
  <tr>
    <td class="Form_LabelRow">
      <span class="Form_LabelText">
      Extended Text:
      </span>
      <span class="Form_HelpText">
      <br>Enter the body of the article 
      </span>
      <community:HtmlTextBox CssClass="htmlDesigner" SelectedFontSize="3" SelectedFontFace="Times New Roman" id="txtBodyText" Width="450" Height="500" Columns="50" Rows="15" runat="server"/>
    </td>
  </tr>
  <tr class="Form_LabelText">
    <td align="right">
      <asp:Button id="btnPreview" runat="Server" CssClass="Form_Button" Text="Preview"/>
      <asp:Button id="btnAdd" runat="server" CssClass="Form_Button" Text="Add Article"></asp:Button>
      <asp:Button id="btnEdit" runat="server" CssClass="Form_Button" Text="Apply Changes"></asp:Button>
    </td>
  </tr>
</table>
</asp:Panel>
<asp:Panel id="pnlPreview" Runat="Server">
<table cellpadding="5" width="520">
<tr>
    <td align="right">
    <community:DisplayTopic id="topicPreview" runat="Server"/>
    </td>
</tr>
<tr>
    <td>
    <community:Title id="lblPreviewTitle" CssClass="Article_Title" Runat="Server"/>
    </td>
</tr>
<tr>
    <td>
    <community:BriefDescription id="lblPreviewBriefDescription" CssClass="Article_BriefDescription" Runat="Server" />
    </td>
</tr>
<tr>
    <td>
    <community:ArticleBodyText id="lblPreviewBodyText" Runat="Server" />
    </td>
</tr>
</table>
<p>
<asp:Button id="btnContinue" Text="Finish Preview" Runat="Server" />
</asp:Panel>


⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?