资源简介
。net博客系统。适合学生和初学者下载后学习借鉴,就这样

代码片段和文件信息
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;
public partial class Article : System.Web.UI.Page
{
protected void Page_Load(object sender EventArgs e)
{
int id = Convert.ToInt32(Request.QueryString[“ID“].ToString());
if (id<=0)
{
Response.Write(“请选择文章“);
Response.Redirect(“default.aspx“);
}
//读取数据库连接字符串
string settings = Convert.ToString(ConfigurationManager.ConnectionStrings[“SqlServices“]);
//创建数据库连接对象
SqlConnection myconn = new SqlConnection(settings);
myconn.Open();
string strsql = “select * from Articles Where ArticleID=“ + id;
SqlCommand mycmd = new SqlCommand(strsql myconn);
//SqlDataReader读取数据到记录集后,会自动关闭数据库的连接
SqlDataReader result = mycmd.ExecuteReader();
if (result.Read())
{
lbl_title.Text = result[“title“].ToString();
lbl_content.Text = “ “ + result[“A_Content“].ToString();
}
myconn.Close();
BindList();
}
void BindList()
{
int id = Convert.ToInt32(Request.QueryString[“ID“].ToString());
//读取数据库连接字符串
string settings = Convert.ToString(ConfigurationManager.ConnectionStrings[“SqlServices“]);
//创建数据库连接对象
SqlConnection myconn = new SqlConnection(settings);
myconn.Open();
string strsql = “select * from Comments Where ArticleID=“ + id;
SqlCommand mycmd = new SqlCommand(strsql myconn);
//SqlDataReader读取数据到记录集后,会自动关闭数据库的连接
SqlDataReader result = mycmd.ExecuteReader(CommandBehavior.CloseConnection);
gv_comment.DataSource = result;
gv_comment.DataBind();
}
protected void Foot1_Load(object sender EventArgs e)
{
}
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 893 2007-08-18 22:38 博客系统\博客系统.htm
文件 2673947 2007-08-18 22:38 博客系统\博客系统.swf
文件 3145728 2007-08-16 21:15 博客系统\数据库\BlogData.mdf
文件 1048576 2007-08-16 21:15 博客系统\数据库\BlogData_log.ldf
文件 2243 2007-04-23 12:04 博客系统\源码\Admin\AddNew.ascx
文件 2438 2007-04-23 18:04 博客系统\源码\Admin\AddNew.ascx.cs
文件 2891 2007-04-23 18:03 博客系统\源码\Admin\AddNew.aspx
文件 447 2007-04-23 18:03 博客系统\源码\Admin\AddNew.aspx.cs
文件 6105 2007-04-23 17:44 博客系统\源码\Admin\AddPhoto.aspx
文件 2944 2007-04-23 16:48 博客系统\源码\Admin\AddPhoto.aspx.cs
文件 6201 2007-04-23 16:36 博客系统\源码\Admin\AddVideo.aspx
文件 2932 2007-04-24 14:00 博客系统\源码\Admin\AddVideo.aspx.cs
文件 1231 2007-04-23 11:22 博客系统\源码\Admin\articleList.ascx
文件 2058 2006-12-25 16:49 博客系统\源码\Admin\articleList.ascx.cs
文件 3118 2007-04-23 18:04 博客系统\源码\Admin\ArticleManage.aspx
文件 541 2007-04-23 18:04 博客系统\源码\Admin\ArticleManage.aspx.cs
文件 452 2006-08-02 21:01 博客系统\源码\Admin\CheckCode.aspx
文件 3228 2006-08-11 20:50 博客系统\源码\Admin\CheckCode.aspx.cs
文件 4620 2007-04-23 17:41 博客系统\源码\Admin\CommentManage.aspx
文件 2052 2007-04-23 17:42 博客系统\源码\Admin\CommentManage.aspx.cs
文件 3006 2007-04-23 17:32 博客系统\源码\Admin\Default.aspx
文件 416 2007-04-23 17:35 博客系统\源码\Admin\Default.aspx.cs
文件 1134 2006-12-19 17:20 博客系统\源码\Admin\help.ascx
文件 418 2006-12-19 17:12 博客系统\源码\Admin\help.ascx.cs
文件 6804 2007-04-23 11:10 博客系统\源码\Admin\login.aspx
文件 3067 2006-12-21 13:39 博客系统\源码\Admin\login.aspx.cs
文件 1068 2007-04-23 17:31 博客系统\源码\Admin\Menu.ascx
文件 418 2006-12-19 17:09 博客系统\源码\Admin\Menu.ascx.cs
文件 5382 2007-04-23 16:08 博客系统\源码\Admin\Mod.aspx
文件 2251 2007-04-23 16:08 博客系统\源码\Admin\Mod.aspx.cs
............此处省略58个文件信息
相关资源
- USB.Over.Network.Server 注册机
- dotnet 写字板 实验 源代码 不好请要不
- .net面试简历内容非常细致
- .net网站服装销售系统(MVC)
-
分别适用于.NET fr
amework 2.0和4.0的E -
安装 .net fr
amework 4.0失败原因是KB9 - 简单的9个页面静态网页,适合做个人
- vs2005骑士巡游问题-分治法C
- 企业销售管理信息系统(全套)
- 选择题自动考试系统
- EXCEL文件转换成固定的格式的文本格式
- .net计件工资管理程序 啊
- powerdatagrid控件 源码
- SunnyUI.Net
- .NET WinForm 和 WPF 的UI界面库,收集整合
- 个人博客系统+文档
- Oxford Industries 采用 Microsoft.NET 平台实
- ssk皮肤
- dotnetfx_cleanup_tool .NET删除工具
- 《WCF服务编程(第三版)》.pdf
- 初学Visual Basic 2010代码
- 网上购物商城系统完整版
- Butterfly.net通过按需计算推动下一代游
- artnet 开发包
- Spring Boot技术栈博客企业前后端2018
- Apress.Exploring.the.NET.Core.3.0.Runtime.pdf
- 主rac + 备rac dg 部署_blog版.pdf
- .NET工作流源码架构100%可用
- AForge .net 最新版 2.2.5
- 基于.net开发的旅游网站系统
评论
共有 条评论