📄 addnews.aspx
字号:
<%@ Page Language="C#" MasterPageFile="~/Admin/mstAdmin.master" AutoEventWireup="true" CodeFile="AddNews.aspx.cs" Inherits="Admin_AddNews" Title="Untitled Page" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<br />
添加新闻<br />
<br />
<table border="1" cellpadding="3" cellspacing="0" width="550">
<tr align="left">
<td width="100">
新闻标题:</td>
<td>
<asp:TextBox ID="tbxNewsTitle" runat="server" MaxLength="50" SkinID="tbxDefaultSkin" ToolTip="新闻标题,最多50个字" ValidationGroup="News" Width="300px"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="tbxNewsTitle"
Display="Dynamic" ErrorMessage="输入标题!" SetFocusOnError="True" ValidationGroup="News"></asp:RequiredFieldValidator></td>
</tr>
<tr align="left">
<td>
新闻关键字:</td>
<td>
<asp:TextBox ID="tbxKeyword" runat="server" SkinID="tbxDefaultSkin" ToolTip="允许多个关键字之间以英文逗号隔开" ValidationGroup="News" Width="300px"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="tbxKeyword"
Display="Dynamic" ErrorMessage="输入关键字!" SetFocusOnError="True" ValidationGroup="News"></asp:RequiredFieldValidator></td>
</tr>
<tr align="left">
<td>
选择模板:</td>
<td>
<asp:DropDownList ID="ddlstTemplate" runat="server" DataSourceID="ObjectDataSource2"
DataTextField="NewsTemplateName" DataValueField="NewsTemplateURL">
</asp:DropDownList>
<asp:ObjectDataSource ID="ObjectDataSource2" runat="server" SelectMethod="GetAllTemplate"
TypeName="eTemplate"></asp:ObjectDataSource>
</td>
</tr>
<tr align="left">
<td>
新闻内容:</td>
<td>
<asp:TextBox ID="tbxContent" runat="server" TextMode="MultiLine" Width="400px" Height="300px"></asp:TextBox></td>
</tr>
<tr align="left">
<td>
上传图片:</td>
<td>
<asp:FileUpload ID="fldImage" runat="server" ToolTip="只支持JPG和GIF格式!" />
<asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ControlToValidate="fldImage"
Display="Dynamic" ErrorMessage="文件类型不对!" SetFocusOnError="True" ValidationExpression="[a-zA-Z]:\\.+(\.([jJ][pP][gG]|[gG][iI][fF]|[jJ][pP][eE][gG]))$"
ValidationGroup="News"></asp:RegularExpressionValidator></td>
</tr>
<tr align="left">
<td>
选择栏目:</td>
<td>
<asp:DropDownList ID="ddlstItem" runat="server" DataSourceID="ObjectDataSource1"
DataTextField="NewsItemName" DataValueField="NewsItemID">
</asp:DropDownList>
<asp:ObjectDataSource ID="ObjectDataSource1" runat="server" SelectMethod="GetAllItem"
TypeName="eNewsItem"></asp:ObjectDataSource>
</td>
</tr>
<tr align="left">
<td>
首页新闻:</td>
<td>
<asp:RadioButtonList ID="rblstShowAtHome" runat="server" RepeatDirection="Horizontal">
<asp:ListItem Value="true">是</asp:ListItem>
<asp:ListItem Selected="True" Value="false">否</asp:ListItem>
</asp:RadioButtonList></td>
</tr>
<tr align="left">
<td>
推荐新闻:</td>
<td>
<asp:RadioButtonList ID="rblstRecommend" runat="server" RepeatDirection="Horizontal">
<asp:ListItem Value="true">是</asp:ListItem>
<asp:ListItem Selected="True" Value="false">否</asp:ListItem>
</asp:RadioButtonList></td>
</tr>
<tr align="left">
<td colspan="2">
<asp:Button ID="btnConfirm" runat="server" OnClick="btnConfirm_Click" Text="提交" ValidationGroup="News" SkinID="btnDefaultSkin" /></td>
</tr>
</table>
</asp:Content>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -