|
下面是一个建立新闻发布系统的程序,不用和数据库打交道哦 步骤: (1).在vs2005中新建网站,新建三个aspx网页,分别命名:title.aspx,news.aspx,main.aspx其中title.aspx用来设置标题,可以自己设计,写几个字也行,news.aspx用来显示新闻标题,main.aspx用来显示新闻内容。 (2).新建htm页,用来设计框架。代码如下: <html xmlns="http://www.w3.org/1999/xhtml" > <head> <title>无标题页</title> </head> <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> </html>(3).现在你的程序还没有内容,新建xml文件,命名contents.xml,用来显示新闻标题,代码如下: <?xml version="1.0" encoding="GB2312"?> <topiclist type="Dreamsite News"> <topic> <title>欢迎进入千里之外的新闻网!</title> <href>main.aspx?name=hello</href> </topic> <topic> <title>测试新闻</title> <href>main.aspx?name=test</href> </topic> <topic> <title> 第一条新闻</title> <href>main.aspx?name[1] [2] [3] [4] [5] [6] 下一页 |
|
|
|
|
|
|
|