Establish a simple press release system with asp.net

Source: Internet
Author: User

Here's a program to build a news release system that doesn't have to deal with databases.

Steps:

(1). Create a new Web site in vs2005 and create a new three ASPX Web page named: title.aspx,news.aspx, Main.aspx which title.aspx used to set the title, you can design, write a few words also line, news.aspx used to display news headlines, main.aspx used to display news content.

(2). Create a new HTM page to design the framework. The code is as follows:


<title>无标题页</title>

<frameset border="0" bordercolor="#6699cc" framespacing="3" id="fsTop" rows="85,*">
<frame frameborder="no" marginheight="0" marginwidth="0" name="title" noresize scrolling="no" src="title.aspx" >
<frameset border="0" frameborder="1" framespacing="3"  cols="110,*">
<frame frameborder="0" marginheight="0" marginwidth="0" name="dir" src="news.aspx" style="BORDER-RIGHT: #99ccff 1px solid; BORDER-TOP: #003366 1px solid" scrolling="auto" >
<frame bordercolor="#6699cc" frameborder="0" name="main" scrolling="yes" src="main.aspx?name=hello" style="BORDER-LEFT: #99ccff 2px groove; BORDER-TOP: #003366 1px solid">
</frameset>
</frameset>

(3). Now your program has no content, new XML file, named Contents.xml, used to display news headlines, the code is as follows:

<?xml version="1.0" encoding="GB2312"?>
<topiclist type="Dreamsite News">
<topic>
<title>欢迎进入千里之外的新闻网!</title>

</topic>
<topic>
<title>测试新闻</title>

</topic>
<topic>
<title> 第一条新闻</title>

</topic>
<topic>
<title> 第二条新闻</title>

</topiclist> Note that each of our news stories is an XML file, now you know what to do, create a new Hello.xml;test.xml;first.xml;dddd.xml file, give an example here, the code is as follows:

<?xml version="1.0" encoding="GB2312"?>
<document>
<title>今日新闻</title>
<abstract>头版新闻</abstract>
<author>千里之外</author>
<content>&lt;paragraph&gt;大家好&lt;/paragraph&gt;</content>
</document>现在你就可以看到效果了,下面我们看一下发布新闻的代码,也很简单,新建manage.aspx页面,前台代码:

<body>
<form id="form1" runat="server">
<div>
<p>千里之外个人新闻发布系统</p>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.