<!--#include file="bsconfig.asp"-->
<!--#include file="Inc/articleCHAR.INC"-->
<%
'=================================
'=================================
%>
<%if Request.QueryString("no")="eshop" then
title=request("title")
content=htmlencode2(Request("content"))
If title="" Then
response.write "SORRY <br>"
response.write "请输入更新内容的标题!!<a href=""javascript:history.go(-1)"">返回重输</a>"
response.end
end if
If content="" Then
response.write "SORRY <br>"
response.write "内容不能为空!!<a href=""javascript:history.go(-1)"">返回重输</a>"
response.end
end if
Set rs = Server.CreateObject("ADODB.Recordset")
sql="select * from Conews "
rs.open sql,conn,1,3
rs.addnew
rs("title")=title
rs("content")=content
rs("counter")=0
rs.update
rs.close
response.redirect "Bs_News.asp"
end if
%>
<!-- #include file="Inc/Head.asp" -->
<BR>
<table cellpadding="2" cellspacing="1" border="0" width="560" align="center" class="a2">
<tr>
<td class="a1" height="25" align="center"><strong>添加新闻</strong></td>
</tr>
<tr class="a4">
<td align="center">
<br>
<table width="550" border="0" cellspacing="0" cellpadding="0">
<tr>
<form method="post" action="Bs_News_Add.asp?no=eshop">
<td><div align="center">
<table width="100%" border="0" cellspacing="2" cellpadding="3">
<tr>
<td width="8%" height="25" bgcolor="#C0C0C0"> <div align="center">标 题</div></td>
<td width="62%" bgcolor="#C0C0C0"><input type="text" name="title" class="inputtext" maxlength="30" size="25"></td>
</tr>
<td height="25" bgcolor="#C0C0C0"><div align="center">内 容</div></td>
<td height="25" bgcolor="#C0C0C0">
<textarea name="content" cols="57" rows="12" wrap="PHYSICAL"></textarea></td>
</tr>
<tr>
<td height="25" colspan="2" bgcolor="#E3E3E3">
<div align="center">
<input type="submit" value="确定">
<input type="reset" value="取消">
</div></td>
</tr>
<tr>
<td colspan="2">图片上传</td>
</tr>
<tr>
<td colspan="2"><div align="center">
<iframe name="ad" frameborder=0 width=100% height=25 scrolling=no src=../uploada.asp></iframe></div></td>
</tr>
</table>
</div></td>
</form>
</tr>
</table>
<br>
</td>
</tr>
</table>
<BR>
<%htmlend%>
————————————————————————————————————————————
复制以上asp程序内容,
请使用Microsoft Office FrontPage 2003打开
可以看到如下图:
————————————————————————————————————————————
如何将网页编辑器嵌入内容里,而且可以正常发送信息在首页出现该信息
————————————————————————————————————————————
下面是编辑器的asp代码
————————————————————————————————————————————
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><title>
CSDN Blog
</title><link type="text/css" rel="stylesheet" href="Resources/content.css" media="screen" />
<script type="text/javascript" src="/scripts/jsframework.js"></script>
<script type="text/javascript">Include("System.IframeAutoFit");</script>
</head>
<body>
<script type="text/javascript" language="javascript">
<!--
function getObject(objectId)
{
if(document.getElementById)
{
return document.getElementById(objectId)
}
else if(document.all&&document.all(objectId))
{
return document.all(objectId)
}
else
{
return false
}
}
function hideObject(objectId)
{
var obj=getObject(objectId);
if(obj&&obj.style)
{
obj.style.display="none";
return true
}
return false
}
function showObject(objectId)
{
var obj=getObject(objectId);
if(obj&&obj.style)
{
obj.style.display="";
return true
}
return false
}
//-->
</script>
<form name="aspnetForm" method="post" action="PostEdit.aspx" οnsubmit="javascript:return WebForm_OnSubmit();" id="aspnetForm">
<div>
<input type="hidden" name="__EVENTTARGET" id="__EVENTTARGET" value="" />
<input type="hidden" name="__EVENTARGUMENT" id="__EVENTARGUMENT" value="" />
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwULLTE2NDM2MTM0ODEPZBYCZg9kFgICAw9kFgICAQ9kFgICAQ8PFgIeBlBvc3RJRAL/D2QWDAIHDxYEHghCYXNlUGF0aAULL2Zja2VkaXRvci8eBVZhbHVlZWQCEw8PFgIeBFRleHRlZGQCGQ8QDxYGHg5EYXRhVmFsdWVGaWVsZAUKQ2F0ZWdvcnlJRB4NRGF0YVRleHRGaWVsZAUFVGl0bGUeC18hRGF0YUJvdW5kZ2QQFQAVABQrAwBkZAIbDxAPFgYfBAUKQ2F0ZWdvcnlJRB8FBQVUaXRsZR8GZ2QQFQwMV2luZG93cy8uTkVUBUMvQysrBEphdmEgV2Vi5byA5Y+RKOiEmuacrOWSjOWKqOaAgeivreiogCkOTGludXgvVW5peC9CU0QV5pWw5o2u5bqT5byA5Y+R5bqU55SoDOa4uOaIj+W8gOWPkQznp7vliqjlvIDlj5EG5rGH57yWD+i9r+W3peS4jueuoeeQhhXnvZHnu5zkuI7ns7vnu5/nrqHnkIYG57u85ZCIFQwCOTECMzUCMzYCNDYCODACNDcCNTECNTMCNDQCNTYCNTgCNDUUKwMMZ2dnZ2dnZ2dnZ2dnZGQCKQ8PFgIfA2VkZAIrDw8WAh8DZWRkGAEFHl9fQ29udHJvbHNSZXF1aXJlUG9zdEJhY2tLZXlfXxYHBTVjdGwwMCRDb250ZW50UGxhY2VIb2xkZXIxJEVudHJ5RWRpdG9yMSRDYXRlZ29yeUxpc3QkMAUzY3RsMDAkQ29udGVudFBsYWNlSG9sZGVyMSRFbnRyeUVkaXRvcjEkY2tiUHVibGlzaGVkBTJjdGwwMCRDb250ZW50UGxhY2VIb2xkZXIxJEVudHJ5RWRpdG9yMSRjaGtDb21tZW50cwU5Y3RsMDAkQ29udGVudFBsYWNlSG9sZGVyMSRFbnRyeUVkaXRvcjEkY2hrRGlzcGxheUhvbWVQYWdlBTljdGwwMCRDb250ZW50UGxhY2VIb2xkZXIxJEVudHJ5RWRpdG9yMSRjaGtNYWluU3luZGljYXRpb24FQmN0bDAwJENvbnRlbnRQbGFjZUhvbGRlcjEkRW50cnlFZGl0b3IxJGNoa1N5bmRpY2F0ZURlc2NyaXB0aW9uT25seQU2Y3RsMDAkQ29udGVudFBsYWNlSG9sZGVyMSRFbnRyeUVkaXRvcjEkY2hrSXNBZ2dyZWdhdGVk9B/BYsBvXZpFwbG3yaRoCK/Q73k=" />
</div>
<script type="text/javascript">
<!--
var theForm = document.forms['aspnetForm'];
if (!theForm) {
theForm = document.aspnetForm;
}
function __doPostBack(eventTarget, eventArgument) {
if (!theForm.onsubmit || (theForm.onsubmit() != false)) {
theForm.__EVENTTARGET.value = eventTarget;
theForm.__EVENTARGUMENT.value = eventArgument;
theForm.submit();
}
}
// -->
</script>
<script src="/WebResource.axd?d=N_6-Ha0dIJKs7nPaI9js1Q2&t=632804154354531250" type="text/javascript"></script>
<script src="/WebResource.axd?d=dvy1D-qfQGjLXSuVN0ItbgkrNMWdjR7ddu0DWYxXgbY1&t=632804154354531250" type="text/javascript"></script>
<script type="text/javascript">
<!--
function WebForm_OnSubmit() {
if (typeof(ValidatorOnSubmit) == "function" && ValidatorOnSubmit() == false) return false;
return true;
}
// -->
</script>
<div id="page">
<div style="float: left; margin: 0px 10px 0px 0px;">
<div id="ctl00_ContentPlaceHolder1_EntryEditor1_Messages">
</div>
<div style="color: #002C99;">
文章标题<span> <span id="ctl00_ContentPlaceHolder1_EntryEditor1_valTitleRequired" style="color:Red;font-weight:bold;visibility:hidden;">必须输入标题</span></span>
</div>
<div>
<input name="ctl00$ContentPlaceHolder1$EntryEditor1$txbTitle" type="text" maxlength="200" id="ctl00_ContentPlaceHolder1_EntryEditor1_txbTitle" style="width:618px;" />
</div>
<br />
<div style="color: #002C99;">
文章正文<span> </span>
</div>
<div>
<div><input type="hidden" id="ctl00_ContentPlaceHolder1_EntryEditor1_FCKEditor" name="ctl00$ContentPlaceHolder1$EntryEditor1$FCKEditor" value="" /><input type="hidden" id="ctl00_ContentPlaceHolder1_EntryEditor1_FCKEditor___Config" value="" /><iframe id="ctl00_ContentPlaceHolder1_EntryEditor1_FCKEditor___Frame" src="/fckeditor/editor/fckeditor.html?InstanceName=ctl00_ContentPlaceHolder1_EntryEditor1_FCKEditor&Toolbar=Default" width="620px" height="450px" frameborder="no" scrolling="no"></iframe></div>
</div>
<br />
<div style="color: #002C99;">
文章摘要<span> <span id="ctl00_ContentPlaceHolder1_EntryEditor1_Requiredfieldvalidator2" style="color:Red;font-weight:bold;visibility:hidden;">必须填入摘要</span></span>
</div>
<div>
<textarea name="ctl00$ContentPlaceHolder1$EntryEditor1$txbExcerpt" rows="5" cols="20" id="ctl00_ContentPlaceHolder1_EntryEditor1_txbExcerpt" style="width:618px;"></textarea>
</div>
<br />
<div style="width: 600px; text-align: right;">
<span id="postAtention" style="color: Red; font-weight: bold; display: none;">文章正在保存,请稍候......</span>
<input type="submit" name="ctl00$ContentPlaceHolder1$EntryEditor1$SaveButton" value="发表" οnclick="javascript:WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions("ctl00$ContentPlaceHolder1$EntryEditor1$SaveButton", "", true, "", "", false, false))" id="ctl00_ContentPlaceHolder1_EntryEditor1_SaveButton" class="button" />
<input type="submit" name="ctl00$ContentPlaceHolder1$EntryEditor1$CancelButton" value="取消" οnclick="javascript:WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions("ctl00$ContentPlaceHolder1$EntryEditor1$CancelButton", "", true, "", "", false, false))" id="ctl00_ContentPlaceHolder1_EntryEditor1_CancelButton" class="button" />
<div style="text-align: right;">
</div>
</div>
<div>
<span id="ctl00_ContentPlaceHolder1_EntryEditor1_vRegexEntryName" style="color:Red;visibility:hidden;">格式不正确。必须按照以下格式:^[a-zA-Z][/w-]{1,149}$</span>
</div>
<div style="clear: both">
</div>
</div>
<div style="float: right; width: 280px;">
<div class="panelBar">
<div class="panelBarHeader">
文章类型</div>
<div class="panelBarContent">
<table id="ctl00_ContentPlaceHolder1_EntryEditor1_rblOri" border="0">
<tr>
<td><input id="ctl00_ContentPlaceHolder1_EntryEditor1_rblOri_0" type="radio" name="ctl00$ContentPlaceHolder1$EntryEditor1$rblOri" value="ori" checked="checked" /><label for="ctl00_ContentPlaceHolder1_EntryEditor1_rblOri_0">原创</label></td><td><input id="ctl00_ContentPlaceHolder1_EntryEditor1_rblOri_1" type="radio" name="ctl00$ContentPlaceHolder1$EntryEditor1$rblOri" value="copy" /><label for="ctl00_ContentPlaceHolder1_EntryEditor1_rblOri_1">转贴</label></td><td><input id="ctl00_ContentPlaceHolder1_EntryEditor1_rblOri_2" type="radio" name="ctl00$ContentPlaceHolder1$EntryEditor1$rblOri" value="tran" /><label for="ctl00_ContentPlaceHolder1_EntryEditor1_rblOri_2">翻译</label></td>
</tr>
</table>
</div>
</div>
<br />
<div class="panelBar">
<div class="panelBarHeader">
文章分类</div>
<div class="panelBarContent">
</div>
</div>
<br />
<div class="panelBar">
<div class="panelBarHeader">
请选择发表到CSDN文档中心的文章类别</div>
<div class="panelBarContent">
<table id="ctl00_ContentPlaceHolder1_EntryEditor1_GlobalCategoryList" border="0">
<tr>
<td><input id="ctl00_ContentPlaceHolder1_EntryEditor1_GlobalCategoryList_0" type="radio" name="ctl00$ContentPlaceHolder1$EntryEditor1$GlobalCategoryList" value="91" /><label for="ctl00_ContentPlaceHolder1_EntryEditor1_GlobalCategoryList_0">Windows/.NET</label></td>
</tr><tr>
<td><input id="ctl00_ContentPlaceHolder1_EntryEditor1_GlobalCategoryList_1" type="radio" name="ctl00$ContentPlaceHolder1$EntryEditor1$GlobalCategoryList" value="35" /><label for="ctl00_ContentPlaceHolder1_EntryEditor1_GlobalCategoryList_1">C/C++</label></td>
</tr><tr>
<td><input id="ctl00_ContentPlaceHolder1_EntryEditor1_GlobalCategoryList_2" type="radio" name="ctl00$ContentPlaceHolder1$EntryEditor1$GlobalCategoryList" value="36" /><label for="ctl00_ContentPlaceHolder1_EntryEditor1_GlobalCategoryList_2">Java</label></td>
</tr><tr>
<td><input id="ctl00_ContentPlaceHolder1_EntryEditor1_GlobalCategoryList_3" type="radio" name="ctl00$ContentPlaceHolder1$EntryEditor1$GlobalCategoryList" value="46" /><label for="ctl00_ContentPlaceHolder1_EntryEditor1_GlobalCategoryList_3">Web开发(脚本和动态语言)</label></td>
</tr><tr>
<td><input id="ctl00_ContentPlaceHolder1_EntryEditor1_GlobalCategoryList_4" type="radio" name="ctl00$ContentPlaceHolder1$EntryEditor1$GlobalCategoryList" value="80" /><label for="ctl00_ContentPlaceHolder1_EntryEditor1_GlobalCategoryList_4">Linux/Unix/BSD</label></td>
</tr><tr>
<td><input id="ctl00_ContentPlaceHolder1_EntryEditor1_GlobalCategoryList_5" type="radio" name="ctl00$ContentPlaceHolder1$EntryEditor1$GlobalCategoryList" value="47" /><label for="ctl00_ContentPlaceHolder1_EntryEditor1_GlobalCategoryList_5">数据库开发应用</label></td>
</tr><tr>
<td><input id="ctl00_ContentPlaceHolder1_EntryEditor1_GlobalCategoryList_6" type="radio" name="ctl00$ContentPlaceHolder1$EntryEditor1$GlobalCategoryList" value="51" /><label for="ctl00_ContentPlaceHolder1_EntryEditor1_GlobalCategoryList_6">游戏开发</label></td>
</tr><tr>
<td><input id="ctl00_ContentPlaceHolder1_EntryEditor1_GlobalCategoryList_7" type="radio" name="ctl00$ContentPlaceHolder1$EntryEditor1$GlobalCategoryList" value="53" /><label for="ctl00_ContentPlaceHolder1_EntryEditor1_GlobalCategoryList_7">移动开发</label></td>
</tr><tr>
<td><input id="ctl00_ContentPlaceHolder1_EntryEditor1_GlobalCategoryList_8" type="radio" name="ctl00$ContentPlaceHolder1$EntryEditor1$GlobalCategoryList" value="44" /><label for="ctl00_ContentPlaceHolder1_EntryEditor1_GlobalCategoryList_8">汇编</label></td>
</tr><tr>
<td><input id="ctl00_ContentPlaceHolder1_EntryEditor1_GlobalCategoryList_9" type="radio" name="ctl00$ContentPlaceHolder1$EntryEditor1$GlobalCategoryList" value="56" /><label for="ctl00_ContentPlaceHolder1_EntryEditor1_GlobalCategoryList_9">软工与管理</label></td>
</tr><tr>
<td><input id="ctl00_ContentPlaceHolder1_EntryEditor1_GlobalCategoryList_10" type="radio" name="ctl00$ContentPlaceHolder1$EntryEditor1$GlobalCategoryList" value="58" /><label for="ctl00_ContentPlaceHolder1_EntryEditor1_GlobalCategoryList_10">网络与系统管理</label></td>
</tr><tr>
<td><input id="ctl00_ContentPlaceHolder1_EntryEditor1_GlobalCategoryList_11" type="radio" name="ctl00$ContentPlaceHolder1$EntryEditor1$GlobalCategoryList" value="45" /><label for="ctl00_ContentPlaceHolder1_EntryEditor1_GlobalCategoryList_11">综合</label></td>
</tr>
</table>
</div>
</div>
<br />
<div class="panelBar">
<div class="panelBarHeader">
高级选项(一般不用选择)
</div>
<div class="panelBarContent">
<input id="ctl00_ContentPlaceHolder1_EntryEditor1_ckbPublished" type="checkbox" name="ctl00$ContentPlaceHolder1$EntryEditor1$ckbPublished" checked="checked" /><label for="ctl00_ContentPlaceHolder1_EntryEditor1_ckbPublished">发布到网页</label><br />
<input id="ctl00_ContentPlaceHolder1_EntryEditor1_chkComments" type="checkbox" name="ctl00$ContentPlaceHolder1$EntryEditor1$chkComments" checked="checked" /><label for="ctl00_ContentPlaceHolder1_EntryEditor1_chkComments">允许评论</label><br />
<input id="ctl00_ContentPlaceHolder1_EntryEditor1_chkDisplayHomePage" type="checkbox" name="ctl00$ContentPlaceHolder1$EntryEditor1$chkDisplayHomePage" checked="checked" /><label for="ctl00_ContentPlaceHolder1_EntryEditor1_chkDisplayHomePage">在首页显示</label><br />
<input id="ctl00_ContentPlaceHolder1_EntryEditor1_chkMainSyndication" type="checkbox" name="ctl00$ContentPlaceHolder1$EntryEditor1$chkMainSyndication" checked="checked" /><label for="ctl00_ContentPlaceHolder1_EntryEditor1_chkMainSyndication">允许客户端订阅</label><br />
<input id="ctl00_ContentPlaceHolder1_EntryEditor1_chkSyndicateDescriptionOnly" type="checkbox" name="ctl00$ContentPlaceHolder1$EntryEditor1$chkSyndicateDescriptionOnly" checked="checked" /><label for="ctl00_ContentPlaceHolder1_EntryEditor1_chkSyndicateDescriptionOnly">仅在索引页显示摘要</label><br />
<input id="ctl00_ContentPlaceHolder1_EntryEditor1_chkIsAggregated" type="checkbox" name="ctl00$ContentPlaceHolder1$EntryEditor1$chkIsAggregated" checked="checked" /><label for="ctl00_ContentPlaceHolder1_EntryEditor1_chkIsAggregated">允许聚合站点显示</label><br />
</div>
</div>
<div style="clear: both">
</div>
</div>
<script type="text/javascript">
//setTimeout("document.getElementById('lkbPost').disabled=false", 30000);
</script>
</div>
<script type="text/javascript">
<!--
var Page_Validators = new Array(document.getElementById("ctl00_ContentPlaceHolder1_EntryEditor1_valTitleRequired"), document.getElementById("ctl00_ContentPlaceHolder1_EntryEditor1_Requiredfieldvalidator2"), document.getElementById("ctl00_ContentPlaceHolder1_EntryEditor1_vRegexEntryName"));
// -->
</script>
<script type="text/javascript">
<!--
var ctl00_ContentPlaceHolder1_EntryEditor1_valTitleRequired = document.all ? document.all["ctl00_ContentPlaceHolder1_EntryEditor1_valTitleRequired"] : document.getElementById("ctl00_ContentPlaceHolder1_EntryEditor1_valTitleRequired");
ctl00_ContentPlaceHolder1_EntryEditor1_valTitleRequired.controltovalidate = "ctl00_ContentPlaceHolder1_EntryEditor1_txbTitle";
ctl00_ContentPlaceHolder1_EntryEditor1_valTitleRequired.errormessage = "必须输入标题";
ctl00_ContentPlaceHolder1_EntryEditor1_valTitleRequired.evaluationfunction = "RequiredFieldValidatorEvaluateIsValid";
ctl00_ContentPlaceHolder1_EntryEditor1_valTitleRequired.initialvalue = "";
var ctl00_ContentPlaceHolder1_EntryEditor1_Requiredfieldvalidator2 = document.all ? document.all["ctl00_ContentPlaceHolder1_EntryEditor1_Requiredfieldvalidator2"] : document.getElementById("ctl00_ContentPlaceHolder1_EntryEditor1_Requiredfieldvalidator2");
ctl00_ContentPlaceHolder1_EntryEditor1_Requiredfieldvalidator2.controltovalidate = "ctl00_ContentPlaceHolder1_EntryEditor1_txbExcerpt";
ctl00_ContentPlaceHolder1_EntryEditor1_Requiredfieldvalidator2.errormessage = "必须填入摘要";
ctl00_ContentPlaceHolder1_EntryEditor1_Requiredfieldvalidator2.evaluationfunction = "RequiredFieldValidatorEvaluateIsValid";
ctl00_ContentPlaceHolder1_EntryEditor1_Requiredfieldvalidator2.initialvalue = "";
var ctl00_ContentPlaceHolder1_EntryEditor1_vRegexEntryName = document.all ? document.all["ctl00_ContentPlaceHolder1_EntryEditor1_vRegexEntryName"] : document.getElementById("ctl00_ContentPlaceHolder1_EntryEditor1_vRegexEntryName");
ctl00_ContentPlaceHolder1_EntryEditor1_vRegexEntryName.controltovalidate = "ctl00_ContentPlaceHolder1_EntryEditor1_txbEntryName";
ctl00_ContentPlaceHolder1_EntryEditor1_vRegexEntryName.evaluationfunction = "RegularExpressionValidatorEvaluateIsValid";
ctl00_ContentPlaceHolder1_EntryEditor1_vRegexEntryName.validationexpression = "^[a-zA-Z][//w-]{1,149}$";
// -->
</script>
<div>
<input type="hidden" name="__EVENTVALIDATION" id="__EVENTVALIDATION" value="/wEWHAK7van8BwLFyaVsAqGVzZ4GAoChxNQEAsOLzgcCot7s9wICu6vZ2Q4C3ZfCqgsCrMrx2w4ChrzKvw4CnLz6vw4CnLz+vw4Cnbz+vw4CibzGvw4Cnbzivw4CmrzKvw4Cmrzyvw4Cnbz2vw4Cmrz+vw4CmrymvA4Cnbz6vw4CkdOs0gICud/usgYC076f/goChpOBmA4C/PnUwgUCq4yQjwcCk8K9/goFRJJUpQ6nlu9ZiyPhMRlfQ849nw==" />
</div>
<script type="text/javascript">
<!--
var Page_ValidationActive = false;
if (typeof(ValidatorOnLoad) == "function") {
ValidatorOnLoad();
}
function ValidatorOnSubmit() {
if (Page_ValidationActive) {
return ValidatorCommonOnSubmit();
}
else {
return true;
}
}
// -->
</script>
</form>
<script type="text/javascript">document.write("<img src=http://counter.csdn.net/pv.aspx?id=28 border=0 width=0 height=0>");</script>
</body>
</html>
————————————————————————————————————————————————
小弟刚入行不久,遇见辣手之事。只好在这里请教各位高手。希望您的赐教,能达到本人的目的。本人联系方式:QQ:20021110 全天20小时等大虾的好消息。我在这里感激不尽!