|
![]() |
名片设计 CorelDRAW Illustrator AuotoCAD Painter 其他软件 Photoshop Fireworks Flash |
|
/* 豆腐制作 都是精品 http://www.asp888.net 豆腐技术站 如转载 请保留完整版权信息 */ 呵呵,连续看了几个特殊复杂的程序,相信大的脑袋已经和 豆腐 的脑袋差不多 变成了一个大大的。。好吧,最后写个简朴简朴的程序,我们就算是 作个总结吧! 我们在前面的程序中将我们的栏目的所有的 标题都已经用分页的方式显示出来了,所以我们在这里做上一个把栏目的内容显示出来的程序就可以了,这个程序很简朴,大家可以舒适的靠在椅子上来阅读这篇文章 viewarticl.aspx: <%@ Import Namespace="System.Data" %> <%@ Import Namespace="System.Data.SQL" %> <script runat=server language="C#"> protected void Page_Load(Object Src, EventArgs E){ int intRecID=Request.QueryString["id"].ToInt16(); SQLDataReader dbRead; SQLCommand dbComm; String strSQL; String strConn; SQLConnection conn; Hashtable Cfg=new Hashtable(); Cfg = (Hashtable)Context.GetConfig("appsettings"); strConn=Cfg["Conn"].ToString(); conn = new SQLConnection(strConn); strSQL="select * from lanmu where id=" + intRecID.ToString(); dbComm=new SQLCommand(strSQL,conn); dbComm.ActiveConnection.Open(); dbComm.Execute(out dbRead); if(!dbRead.Read()){ showmsg.Text="对不起,没有编号为" + intRecID.ToString() + "的文章"; return; } //HttpServerUtility server=new HttpServerUtility(); showmsg.Text=Server.HtmlEncode(dbRead["content"].ToString()); } </script> <html> <head> <title>浏览文章__技术专栏__<%=sqlRead("title")%></title> <%=GrabPage("/inc/head.inc")%> <link rel="stylesheet" type="text/css" href="/doufu.css"> </head> <body> <asp:Label id=showmsg runat=server /> </body> </html> 返回类别: 教程 上一教程: .NET之ASP WebApplication迅速入门(5) 下一教程: 查看主机的内存使用情况 您可以阅读与"使用纯粹的asp+语言制作的栏目治理(三)"相关的教程: · 使用ASPIMAGE制作图形(二) · ASP系列讲座(四)使用脚本语言 · 使用ASPIMAGE制作图形(一) · 使用INSTALLSHIELD制作ASP安装程序(5) · 如何使用ASP制作模似动态生长的表单 |
![]() ![]() |
快精灵印艺坊 版权所有 |
首页![]() ![]() ![]() ![]() ![]() ![]() ![]() |