前台 页面 ASPX
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="addnews.aspx.cs" Inherits="admin_news_addnews"
ValidateRequest="false"%>
<%@ Register TagPrefix="fckeditorv2" Namespace="FredCK.FCKeditorV2" Assembly="FredCK.FCKeditorV2" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.
<HTML>
<HEAD>
<title></title>
<meta content="Microsoft Visual Studio .NET 7.1" name="GENERATOR">
<meta content="C#" name="CODE_LANGUAGE">
<meta content="JavaScript" name="vs_defaultClientScript">
<meta content="http://schemas. name="vs_targetSchema">
<link href="../../admin/style.css" rel="stylesheet" type="text/css" />
<style type="text/css">
.ziti4 { BORDER-RIGHT: #999999 1px solid; BORDER-TOP: #999999 1px; FONT-WEIGHT: normal; FONT-SIZE: 12px; BORDER-LEFT: #999999 1px; COLOR: #1f456b; LINE-HEIGHT: normal; BORDER-BOTTOM: #999999 1px solid; FONT-STYLE: normal; BACKGROUND-COLOR: #7cbed3; FONT-VARIANT: normal }
.bian1 { BORDER-RIGHT: #999999 1px solid; BORDER-TOP: #999999 1px; BORDER-LEFT: #999999 1px; BORDER-BOTTOM: #999999 1px solid; BACKGROUND-COLOR: #efefef }
.STYLE4 { BORDER-RIGHT: #999999 1px solid; BORDER-TOP: #999999 1px; FONT-WEIGHT: normal; FONT-SIZE: 13px; BORDER-LEFT: #999999 1px; COLOR: #1f456b; LINE-HEIGHT: normal; BORDER-BOTTOM: #999999 1px solid; FONT-STYLE: normal; BACKGROUND-COLOR: #7cbed3; FONT-VARIANT: normal }
.ziti4 {
font-size: 12px;
font-style: normal;
line-height: normal;
font-weight: normal;
font-variant: normal;
color: #1F456B;
border-top-width: 1px;
border-right-width: 1px;
border-bottom-width: 1px;
border-left-width: 1px;
border-top-style: none;
border-right-style: solid;
border-bottom-style: solid;
border-left-style: none;
border-top-color: #999999;
border-right-color: #999999;
border-bottom-color: #999999;
border-left-color: #999999;
background-color: #7CBED3;
}
.bian1 {
border-top-style: none;
border-right-style: solid;
border-bottom-style: solid;
border-left-style: none;
border-top-width: 1px;
border-right-width: 1px;
border-bottom-width: 1px;
border-left-width: 1px;
border-top-color: #999999;
border-right-color: #999999;
border-bottom-color: #999999;
border-left-color: #999999;
background-color: #EFEFEF;</style>
<script>
function CheckAll()
{
if(window.document.all.drpclass.selectedIndex == 0)
{
alert("请选择要发布新闻的类型!");
return false;
}
if(window.document.all.txtheadline.value =="")
{
alert("请输入文章标题!");
return false;
}
if(window.document.all.txtTime.value =="")
{
alert("请输入文章发表时间!");
return false;
}
}
</script>
</HEAD>
<body MS_POSITIONING="GridLayout">
<form id="Form1" method="post" runat="server">
<table width="800" cellpadding="0" cellspacing="1" border="0" style="z-index: 100; left: 0px; position: absolute; top: 0px">
<tr height="30">
<td colSpan="2" class="ziti4"> ◆您现在的位置:新闻管理>>添加文章
</td>
</tr>
<tr height="25">
<td class="ziti4" align="right" width="100">所属类型:</td>
<td width="700" class="bian1"><asp:dropdownlist id="drpclass" CssClass="ziti3" runat="server">
<asp:ListItem Selected="True" Value="0">---请选择---</asp:ListItem>
<asp:ListItem Value="1">新闻</asp:ListItem>
<asp:ListItem Value="2">案例</asp:ListItem>
</asp:dropdownlist></td>
</tr>
<tr height="25">
<td class="ziti4" align="right" width="100">文章标题:</td>
<td width="700" class="bian1"><asp:textbox id="txtheadline" CssClass="ziti3" runat="server" Width="300px" MaxLength="100"></asp:textbox>
</td>
</tr>
<tr height="25">
<td class="ziti4" align="right" width="100">URL:</td>
<td width="700" class="bian1"><asp:textbox id="txtURL" CssClass="ziti3" runat="server" Width="300px" MaxLength="100"></asp:textbox>
<asp:RegularExpressionValidator ID="rev" runat ="server" ControlToValidate="txtURL" ErrorMessage="输入的Url格式不正确!" ValidationExpression="http(s)?://([\w-]+\.)+[\w-]+(/[\w- ./?%&=]*)?"></asp:RegularExpressionValidator>
</td>
</tr>
<tr height="25">
<td class="ziti4" align="right" width="100">文章发表时间:</td>
<td width="700" class="bian1"><asp:textbox id="txtTime" CssClass="ziti3" runat="server" Width="191px" MaxLength="20"></asp:textbox>
</td>
</tr>
<tr height="25">
<td class="ziti4" vAlign="top" align="right" width="100">文章内容:</td>
<td width="700" vAlign="top" class="bian1"><FCKEDITORV2:FCKEDITOR id="fck" runat="server" Height="500px"></FCKEDITORV2:FCKEDITOR></td>
</tr>
<tr height="25">
<td colspan="2" align="center" class="ziti4"> <asp:button id="ButOK" runat="server" Text=" 添 加 文 章 " OnClick="ButOK_Click"></asp:button></td>
</tr>
</table>
</form>
</body>
</HTML>