資源簡介
使用ASP.NET技術開發網上書店使用ASP.NET技術開發網上書店使用ASP.NET技術開發網上書店使用ASP.NET技術開發網上書店使用ASP.NET技術開發網上書店使用ASP.NET技術開發網上書店使用ASP.NET技術開發網上書店使用ASP.NET技術開發網上書店使用ASP.NET技術開發網上書店使用ASP.NET技術開發網上書店使用ASP.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?MyBlogModels;
using?MyBlogBLL;
public?partial?class?Article?:?System.Web.UI.Page
{
???
????protected?void?Page_Load(object?sender?EventArgs?e)
????{
????????if?(!IsPostBack)
????????{
????????????if?(Request.QueryString[“Id“]!=null)
????????????{
????????????????int?Id?=?int.Parse(Request.QueryString[“Id“].ToString());
????????????????Articles?article?=?ArticleManager.GetArticleById(Id);
????????????????Session[“Id“]?=?Id;
????????????????if?(article==null||article.Equals(null))
????????????????{
????????????????????this.Page.title?=?“此文章不存在,或被管理員刪除,請見諒“;
????????????????????this.lblContent.Text?=?“此文章不存在,或被管理員刪除,請見諒“;
????????????????}
????????????????else
????????????????{
????????????????????article.Clicks?+=?1;
????????????????????ArticleManager.ModifyArticleById(article);
????????????????????this.lbltitle.Text?=?article.title;
????????????????????this.Page.title?=?article.title;
????????????????????this.lblDate.Text?=?article.PubDate.ToString();
????????????????????this.lblContent.Text?=?article.Contents;
????????????????}
????????????}
????????}
????}
????protected?void?btnCommit_ServerClick(object?sender?EventArgs?e)
????{
????????int?id?=?int.Parse(Request.QueryString[“Id“].ToString());
????????Articles?article?=?ArticleManager.GetArticleById(id);
????????string?commentConent?=?Server.HtmlEncode(this.txtComment.Text.ToString());
????????if?(commentConent.Length>250)
????????{
????????????commentConent?=?commentConent.Substring(0?250);
????????}
????????Comments?comment?=?new?Comments();
????????comment.Article?=?article;
????????comment.AuthorName?=?this.txtCommentName.Text;
????????comment.Comment?=?this.txtComment.Text;
????????comment.CommentPubDate?=?DateTime.Now;
????????int?num?=?CommentManager.AddComment(comment);
????????if?(num?>?0)
????????{
????????????Response.Write(“ript>alert(‘恭喜你,評論添加成功‘);location.href=‘/MyBlog/Article.aspx?Id=“+id+“‘; ript>“);
???????????
????????}
????????else
????????????lblErrorComment.Text?=?“抱歉,您的評論添加失?。≌堉匦聡L試“;
????}
}
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件???????2036??2009-11-25?17:31??題\Default.aspx
?????文件???????2970??2009-12-02?19:16??題\Default.aspx.cs
?????文件????3145728??2010-01-13?17:40??DLC\DB\myBlog.mdf
?????文件????1048576??2010-01-13?17:40??DLC\DB\myBlog_log.ldf
????..A..H.?????22016??2009-12-26?09:59??DLC\DLC1.suo
????..A..H.?????18944??2009-12-26?10:00??DLC\MyBlog\DLC1.suo
?????文件????????754??2010-01-11?16:02??DLC\MyBlog\MyBlog\App_Code\StringHelper.cs
?????文件???????3382??2010-01-13?15:29??DLC\MyBlog\MyBlog\Article.aspx
?????文件???????2472??2010-01-13?15:37??DLC\MyBlog\MyBlog\Article.aspx.cs
?????文件???????3072??2010-01-11?13:56??DLC\MyBlog\MyBlog\Bin\App_Licenses.dll
?????文件??????61440??2007-11-07?11:22??DLC\MyBlog\MyBlog\Bin\AspNetPager.dll
?????文件?????????58??2010-01-13?16:11??DLC\MyBlog\MyBlog\Bin\AspNetPager.dll.refresh
?????文件?????753664??2006-07-18?20:21??DLC\MyBlog\MyBlog\Bin\FreeTextBox.dll
?????文件?????????58??2010-01-11?13:56??DLC\MyBlog\MyBlog\Bin\FreeTextBox.dll.refresh
?????文件??????16384??2010-01-13?17:39??DLC\MyBlog\MyBlog\Bin\MyBlogBLL.dll
?????文件??????17920??2010-01-13?17:39??DLC\MyBlog\MyBlog\Bin\MyBlogBLL.pdb
?????文件??????24576??2010-01-13?17:39??DLC\MyBlog\MyBlog\Bin\MyBlogDAL.dll
?????文件??????26112??2010-01-13?17:39??DLC\MyBlog\MyBlog\Bin\MyBlogDAL.pdb
?????文件??????20480??2010-01-13?17:39??DLC\MyBlog\MyBlog\Bin\MyBlogModels.dll
?????文件??????24064??2010-01-13?17:39??DLC\MyBlog\MyBlog\Bin\MyBlogModels.pdb
?????文件???????1283??2010-01-13?17:03??DLC\MyBlog\MyBlog\Default.aspx
?????文件???????1049??2010-01-13?16:45??DLC\MyBlog\MyBlog\Default.aspx.cs
?????文件???????1735??2010-01-13?15:38??DLC\MyBlog\MyBlog\DefaultUser.aspx
?????文件???????1067??2010-01-13?17:36??DLC\MyBlog\MyBlog\DefaultUser.aspx.cs
?????文件????????382??2010-01-09?15:07??DLC\MyBlog\MyBlog\EditArticle.aspx
?????文件????????717??2010-01-09?15:02??DLC\MyBlog\MyBlog\EditArticle.aspx.cs
?????文件??????47383??2007-11-12?16:17??DLC\MyBlog\MyBlog\images\7000111.jpg
?????文件????????970??2007-11-14?17:48??DLC\MyBlog\MyBlog\images\cancel.jpg
?????文件????????957??2007-11-14?11:45??DLC\MyBlog\MyBlog\images\exitlogin.jpg
?????文件????????981??2007-11-13?17:52??DLC\MyBlog\MyBlog\images\finish.jpg
............此處省略198個文件信息
評論
共有 條評論