请教用ASP.net做网页问题

carl9081 2009-03-08 07:53:03
请问,如要用ASP.net做网页,在管理后台添加文章后,如何自动生成一网页,并将网页文件名做记录,便于在今后管理时进行删除?
...全文
273 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
空心兜兜 2009-03-08
  • 打赏
  • 举报
回复
我们以前用过的一个新闻系统,
文章表包括:ID,user,class,title,nr,count,num(这个是文件的主文件名),data


<!--生成静态页的代码(从Access里粘出来,双引号变4引号了-。-)-->

<HTML><HEAD><TITLE>学院新闻</TITLE><META http-equiv=Content-Type content=""text/html; charset=gb2312""><STYLE type=text/css>
BODY { BACKGROUND-IMAGE: url(http://localhost/xxy1/img/bg.gif); MARGIN: 0px; BACKGROUND-COLOR: #ffffff}a:link {
color: #0066FF;
text-decoration: none;
}
a:visited {
text-decoration: none;
color: #0066FF;
}
a:hover {
text-decoration: none;
color: #0066FF;
}
a:active {
text-decoration: none;
color: #0066FF;
}
.STYLE1 {font-size: xx-small}
</STYLE><META content=""MSHTML 6.00.2900.3157"" name=GENERATOR></HEAD><BODY text=#000000 bgColor=#ffffff leftMargin=0 topMargin=0 background=""http://localhost/xxy1/img/bg.gif""><TABLE class=biankuang cellSpacing=0 cellPadding=0 width=902height=""195"" align=center border=0><TBODY><TR><td> <iframe src=""http://localhost/xxy1/img/top.htm"" width=900 height=""194"" frameborder=""0"" scrolling=""no""></iframe> </td></TR></TBODY></TABLE><TABLE class=biankuang height=337 cellSpacing=0 cellPadding=0 width=902 align=center bgColor=#ffffff border=0><TBODY><TR><TD class=font_black vAlign=top width=238><p> </p>
<p><img src=""http://localhost/xxy1/img/left0_01.gif"" width=""209"" height=""42""><a href=""http://xxy.taru.edu.cn/xxy4/bbs""><img src=""http://localhost/xxy1/img/left0_02.gif"" width=""209"" height=""22"" border=""0""></a><img src=""http://localhost/xxy1/img/left0_03.gif"" width=""209"" height=""17""><a href=""http://xxy.taru.edu.cn/stu/dksg""><img src=""http://localhost/xxy1/img/left0_04.gif"" width=""209"" height=""22"" border=""0""></a><img src=""http://localhost/xxy1/img/left0_05.gif"" width=""209"" height=""16""><a href=""http://localhost/xxy1/column/xsyd/index.html""><img src=""http://localhost/xxy1/img/left0_06.gif"" width=""209"" height=""20"" border=""0""></a><img src=""http://localhost/xxy1/img/left0_07.gif"" width=""209"" height=""18""><a href=""http://localhost/xxy4/article/index.asp?class=通知公告""><img src=""http://localhost/xxy1/img/left0_08.gif"" width=""209"" height=""19"" border=""0""></a><img src=""http://localhost/xxy1/img/left0_09.gif"" width=""209"" height=""15""><img src=""http://localhost/xxy1/img/left0_10.gif"" width=""209"" height=""22""><img src=""http://localhost/xxy1/img/left0_11.gif"" width=""209"" height=""37""></p>
<p> </p>
<LINK href=""http://localhost/xxy1/img/Css_set.css"" type=text/css rel=stylesheet></TD><TD vAlign=top width=662><TABLE height=25 cellSpacing=0 cellPadding=0 width=""100%"" border=0>
<!--DWLayoutTable-->
<TBODY><TR>
<TD width=""11"" height=25> </TD>
<TD width=""320"" valign=""top""><br><IMG src=""http://localhost/xxy1/img/arr_07.jpg"" alt=""2"" width=16 height=10> <A href=""http://localhost/"" class=l_guide STYLE1>主页</A> <IMG src=""http://localhost/xxy1/img/arr_07.jpg"" alt=""1"" width=16 height=10> <A href=""http://localhost/news1.html"" class=l_guide STYLE1>学院新闻</A></TD>
<TD width=""332""> </TD>
</TR></TBODY></TABLE>
<TABLE height=37 cellSpacing=0 cellPadding=0 width=""100%"" border=0><TBODY><TR><TD align=middle width=38> </TD><TD align=middle width=628 height=37><DIV align=left><IMG height=33 src=""http://localhost/xxy1/img/second_news_101.gif"" width=629></DIV></TD></TR></TBODY></TABLE><TABLE cellSpacing=0 cellPadding=0 width=""100%"" border=0><TBODY><TR><TD vAlign=top align=middle width=34 height=264><p align=""center""><img src=""http://localhost/xxy1/img/left2.jpg"" width=""3"" height=""600"" align=""middle""></p></TD><TD vAlign=top width=626><DIV align=left><LINK href=""http://localhost/xxy1/img/Css_set.css"" type=text/css rel=stylesheet><TABLE height=245 cellSpacing=0 cellPadding=0 width=576 border=0><TBODY><TR><TD class=font_black vAlign=top><TABLE cellSpacing=0 cellPadding=0 width=""96%"" align=center border=0><TBODY><TR><TD> </TD></TR></TBODY></TABLE><TABLE height=108 cellSpacing=0 cellPadding=0 width=""96%"" align=center border=0><TBODY><TR><TD height=33><DIV class=font-time align=center><SPAN class=font-title><p align=""center""><br><font size=""+2""><strong>$title</strong></font><br><IMG height=13 src=""http://localhost/xxy1/img/news-down.gif"" width=520><BR></DIV></TD></TR><TR><TD height=25><DIV class=font-12-black align=center><font size=""-1"">信息来源:$user 发布时间:$date1</font><br><IMG height=13 src=""http://localhost/xxy1/img/news-down.gif"" width=520></DIV></TD></TR><TR><TD height=25><BR><TABLE cellSpacing=0 cellPadding=0 width=""""96%""""
align=center border=0>
<TBODY>
<TR>
<TD class=font-13>
<DIV align=left><font size=""+1"">$nr</font></DIV>
<DIV align=left></DIV>
<DIV
align=right>                       </DIV></TD></TR></TBODY></TABLE><P> </P></TD></TR></TBODY></TABLE><BR></TD></TR></TBODY></TABLE></DIV></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE>
<TABLE class=biankuang_down cellSpacing=0 cellPadding=0 width=900 align=center border=0><TBODY><TR><TD><iframe src=""http://localhost/xxy1/img/bottom.html"" height=72 width=900 frameborder=""0"" scrolling=""no""></iframe></TD></TR></TBODY></TABLE></BODY></HTML>

空心兜兜 2009-03-08
  • 打赏
  • 举报
回复
数据库里的文章编号即为文件名
wuyq11 2009-03-08
  • 打赏
  • 举报
回复
通过文本编辑器添加内容,点保存时,通过htm模板生成html页,把文件名保存到数据库。
carl9081 2009-03-08
  • 打赏
  • 举报
回复
能说得仔细点,或者举个例子或留个联系方式不?我真的不很懂,拜托了!
namhyuk 2009-03-08
  • 打赏
  • 举报
回复
前台通过FCKEditor等输入文章,向数据库如SqlServer的nvarchar(max)字段添加文章,
然后aspx网页通过代码用DataList等把文章列表显示出来。。

或者增加一个附件上传功能,上传到SqlServer的nvarbinary(max)字段。

62,268

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术交流专区
javascript云原生 企业社区
社区管理员
  • ASP.NET
  • .Net开发者社区
  • R小R
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

.NET 社区是一个围绕开源 .NET 的开放、热情、创新、包容的技术社区。社区致力于为广大 .NET 爱好者提供一个良好的知识共享、协同互助的 .NET 技术交流环境。我们尊重不同意见,支持健康理性的辩论和互动,反对歧视和攻击。

希望和大家一起共同营造一个活跃、友好的社区氛围。

试试用AI创作助手写篇文章吧