Asp实验报告

时间:2024.5.8

计算机科学系

实验报告册

 


实验一:设计一个HTML的网页

实验内容:

1.         设计一个HTML的网页

实验目标:

1.         了解学生对HTML语言的熟悉程序

实验要求:

自选题目上,用HTML语言设计一个网页,尽可能用到CSS,DIV,JS等技术。

完成下面的实验报告


实    验    报    告

学号:   20114691       姓名:        常磊           成绩:                   

实验二:用户注册页面的设计与实现

实验内容:

2.         ASP.NET中控件的添加及相应属性和事件的设计

3.         数据库的连接与实现数据的插入操作。

4.         用户验证控件

实验目的:

2.         熟练掌握ASP.NET中控件的添加及相应属性和事件的设计

3.         掌握使用Connection对象实现数据库的连接

4.         掌握使用Command对象实现数据的操作

5.         掌握用户验证控件的作用与使用方法

实验说明:

  在BookShop网站中实现用户注册的页面设计,并实现把数据添加到数据库CK_bookshop的users表中,用户注册的参考界面如下所示。

实验要求:

实现用户注册页面的,并完成下面的实验报告。


实    验    报    告

学号:  20114691        姓名:     常磊              成绩:                   


实验三:网络投票系统

实验内容:

5.         网络投票系统

6.         显示投票结果

教学目的:

6.         掌握各种内置对象的使用。

实验要求:

  在BookShop网站中添加一个页面,对其中的几个主要的出版社(机械工业出版社、金盾出版社、科学出版社、人民教育出版社)的图书质量,(每人限投一次,通过客户端的IP来确定)。 并显示出投票结果(用一个新的页面来显示投标结果)。

并在投票页面显示已投票人数和正在投票人数(通过内置对象来显示人数)。当用户已经投票,可查看投票结果。

说明:可以根据需要在数据库中添加表来存放投票的信息。

投票页面参考界面如下:


实    验    报    告

学号:     20114691     姓名:        常磊           成绩:                   


实验四:GridView控件的使用

实验内容:

7.         网上书店中畅default.aspx中畅销图书、最新书评、站内新闻的完成。

实验目的:

7.         掌握GridView控件的使用。

8.         掌握DataSource控件的设置与使用。

实验说明:

  在BookShop网站的default.aspx页面中,实现显示畅销图书、最新书评、站内新闻的功能。其中畅销图书一栏按照SellNumber列的降序排列后显示Book表中前五条记录的“书名、作者、出版社、售价”等信息,最新书评一栏是按照date列排序后显示BookComment中前五条记录的的“标题、书评、发表人、日期等”信息。站内新闻一栏按照date列的降序排列后显示的“标题、发表日期”等信息。

 而畅销图书后的 “更多”按钮则是进入到相应的NewBook.aspx页面显示所有图书的信息;

   最新书评后的 “更多”按钮则是进入到相应的Shuping.aspx页面显示所有图书的信息;

站内新闻后的 “更多”按钮则是进入到相应的News.aspx页面显示所有图书的信息;

Defalt.aspx页面参考界面如下:


实    验    报    告

学号:     20114691     姓名:        常磊           成绩:                   


实验五:分页显示数据信息

实验内容:

8.         不同参数实现不同的显示结果

9.         使用DataPageSource实现数据分页显示

教学目的:

9.         熟练掌握参数的传递和接收并实现不同数据的显示。

10.     掌握利用DataPageSource来实现数据分页显示。

11.     掌握利用数据源的DataKeyField属性实现对选定数据的操作。

实验要求:

  在BookShop网站实现显示图书、显示书评、显示新闻、明星用户页面。相应的页面功能可参考给出的例。并在显示图书中通过单击“立即购买”则把该图书添加到“个人的购物车中”。显示图书的参考界面如下:

其他页面的显示也可参照图书显示的页面。

填写下面的实验报告。

实    验    报    告

学号:     20114691     姓名:        常磊           成绩:                    


课程实训

实训项目:

设计一个网站,用ASP.NET技术来开发

实训目标:

1.       通过实训可以达到全面理解、运用网页制作的知识,并使之得以融会贯通,在掌握理论的基础上再加以实践,进一步提高、加强学生的综合能力,培养学生的创新能力与独立思考能力,并使其具有分析问题、解决问题的能力。

2.         掌握一个网站的完整制作步骤和操作方法。

实训要求:

根据自己的兴趣,设计一个个人站点或介绍一个集体的小站,围绕一个主题并能够体现出自己的个性,至少有10个页面,三级链接,有整体框架结构,表格定位以及表单处理等,布局合理,色彩搭配协调统一,内容丰富多彩,页面风格独特。而且了解实训的意义、目的、要求、任务和考核方式,知道网站开发要求、开发规范;

完成实训报告。


ASP.NET课程实训报告

项目名称:

  多多小说网

小组成员:

常磊 马旭超

个人负责完成的部份:

   我负责编写主页文件夹下页面的功能实现,和数据库的优化;

需求分析:

   随着信息化时代的到来,阅读小说网络化已成为现代读者的主要方式。本系统的开发符合大众的需求,更有利于本小说的发展。系统通过运用互联网这种新型信息服务载体,来改造传统的小说阅读方式,加强本小说网的宣传力度,更方便、更快捷地服务于各界小说阅读者。同时提高《duoduo小说网》的知名度,打造出一个系统体制规范的网络小说阅读天地。

系统设计(这部分小组成员相同)

本系统提供小说的浏览,查找和在线阅读功能,系统还提供了用户留言功能。为管理员提供留言、小说、用户的一系列操作。

1、        系统功能设计

    

2、       

数据库设计

       说明系统中用到的数据,分析出实体和联系,绘制出E-R图,并给出相应的关系模型,最后给出数据表的结构。

1.E-R图

2.关系模型

3.表的设计

Book

4.关系模式

1.Book(BookID,BookName,BookClassID,People,Jianjie,Picture,Date,Dianji,neirong)外键:BookClassID

图书(图书号,图书名,图书类型号,作者,简介,图片,时间,点击,内容)外键:图书号

2.BookClass(BookClassID,BookClassName)

图书类型(图书类型号,类型名)

3.Leaveword(LeaveWordID,Desn,Body,Date,UserID)外键:UserID

留言(留言号,标题,内容,发表时间,用户号)外键:用户号

4.Role(RoleID,RoleName)

角色(角色号,角色名)

5.Users(UserID,UserName,Password,RealName,Address,Phone,Mobile,Email,Sex,RoleID)外键:RoleID

用户(用户号,用户名,密码,真实姓名,住址,固话,移动电话,电子邮件,性别,角色号)外键:角色号

6.Ydls(ydID,BookID,UserID,Datetime)外键:BookID,UserID

阅读历史(阅读号,图书号,用户号,阅读时间)外键:图书号,用户号

系统实现:

  这部分给出你负责部分的主要代码(如果是页面,截取页面)

1.登录

HttpCookie cookie = Request.Cookies["CheckCode"];

        if (cookie.Value == this.TextBox3.Text.Trim())

        {

            try

            {

                string str = @"Data Source=WIN7U-20111109S\SQLEXPRESS;Initial Catalog=duoduo;Integrated Security=True";

                SqlConnection conn = new SqlConnection(str);

                conn.Open();

                SqlCommand sql = new SqlCommand("select UserName from Users where UserName='" + TextBox1.Text.Trim() + "'", conn);

                int count = Convert.ToInt32(sql.ExecuteScalar());

                if (count > 0)

                {

                    SqlCommand sql1 = new SqlCommand("select Role.RoleName,Users.UserName from Users,Role where Users.UserName='" + this.TextBox1.Text.Trim() + "'and Users.RoleID=Role.RoleID", conn);

                    SqlDataReader read = sql1.ExecuteReader();

                    read.Read();

                    u = read["RoleName"].ToString();

                    read.Close();

                    if (u == "管理员")

                    {

                        SqlCommand sqlcm = new SqlCommand("select UserID,UserName,Password from Users where UserName='" + this.TextBox1.Text.Trim() + "' and Password='" + this.TextBox2.Text.Trim() + "'", conn);

                        SqlDataReader reader = sqlcm.ExecuteReader();

                        if (reader.Read())

                        {

                            username = this.TextBox1.Text;

                            password = this.TextBox2.Text;

                            username = reader["UserName"].ToString();

                            password = reader["Password"].ToString();

                            Session["u"] = TextBox1.Text;

                            Session.Timeout = 300;

                            this.TextBox1.Text = "";

                            this.TextBox2.Text = "";

                            Response.Write("<script>alert('恭喜您!登录成功!');location.href='../guanli/guanli.aspx';</script>");

                            reader.Close();

                            conn.Close();   

                        }

                        else

                        {

                            Response.Write("<script>alert('用户名或密码错误,请重新输入!');</script>");

                            this.TextBox1.Text = "";

                            this.TextBox2.Text = "";

                        }

                    }

                    else

                    {

                        SqlCommand sqlcm = new SqlCommand("select UserName,Password from Users where UserName='" + this.TextBox1.Text.Trim() + "' and Password='" + this.TextBox2.Text.Trim() + "'", conn);

                        SqlDataReader reader = sqlcm.ExecuteReader();

                        if (reader.Read())

                        {

                            username = this.TextBox1.Text;

                            password = this.TextBox2.Text;

                            username = reader["UserName"].ToString();

                            password = reader["Password"].ToString();

                            Session["u"] = TextBox1.Text;

                            Session.Timeout = 300;

                            this.TextBox1.Text = "";

                            this.TextBox2.Text = "";

                            Response.Write("<script>alert('恭喜您!登录成功!');location.href='Default.aspx';</script>");

                            reader.Close();

                            conn.Close();

                        }

                        else

                        {

                            Response.Write("<script>alert('用户名或密码错误,请重新输入!');</script>");

                            this.TextBox1.Text = "";

                            this.TextBox2.Text = "";

                        }

                    }

                }

                else

                {

                    Response.Write("<script>alert('对不起!用户不存在,请确认后再次输入!');</script>");

                    this.TextBox1.Text = "";

                }

            }

            catch (Exception ex)

            {

                Response.Write(ex.Message);

            }

        }

        else

        {

            Response.Write("<script>alert('验证码错误!')</script>");

        }

2.注册

  try

        {

            string str = @"Data Source=WIN7U-20111109S\SQLEXPRESS;Initial Catalog=duoduo;Integrated Security=True";

            SqlConnection conn = new SqlConnection(str);

            conn.Open();

            SqlCommand sql = new SqlCommand("select UserName from Users where UserName='"+TextBox1.Text.Trim()+"'",conn);

            int count = Convert.ToInt32(sql.ExecuteScalar());

            if (count > 0)

            {

                Response.Write("<script>alert('对不起!用户名已存在,请选择其他名字!');</script>");

                this.TextBox1.Text = "";

            }

            else

            {

                SqlCommand sqlcm = new SqlCommand("insert into Users(RoleID,UserName,Password,RealName,Address,Phone,Mobile,Email,Sex)values('"+1+"','" + this.TextBox1.Text.Trim() + "','" + this.TextBox2.Text.Trim() + "','" + this.TextBox4.Text.Trim() + "','" + this.TextBox5.Text.Trim() + "','" + this.TextBox6.Text.Trim() + "','" + this.TextBox7.Text.Trim() + "','" + this.TextBox8.Text.Trim() + "','" + this.RadioButtonList1.Text.Trim() + "')", conn);

                sqlcm.ExecuteNonQuery();

                conn.Close();

                Response.Write("<script>alert('恭喜您!注册成为多多会员!赶紧登录吧!!!');location.href='login.aspx';</script>");

            }

        }

        catch (Exception ex)

        {

            Response.Write(ex.Message);

        }

3.主页

  this.LinkButton37.Visible = false;

        if (!Page.IsPostBack)

        {

            if (Session["u"] != null)

            {

                Label1.Text = Session["u"].ToString();

                try

                {

                    string str = @"Data Source=WIN7U-20111109S\SQLEXPRESS;Initial Catalog=duoduo;Integrated Security=True";

                    SqlConnection conn = new SqlConnection(str);

                    conn.Open();

                    SqlCommand sql = new SqlCommand("select RoleID from Users where UserName='" + Session["u"] + "'", conn);

                    SqlDataReader read = sql.ExecuteReader();

                    read.Read();

                    string s=read["RoleID"].ToString();

                    if (s == "2")

                    {

                        this.LinkButton37.Visible = true;

                    }

                    else

                    {

                        this.LinkButton37.Visible = false;

                    }

                }

                catch (Exception ex)

                {

                    Response.Write(ex.Message);

                }

            }

            else

            {

                Label1.Text = "游客";

            }

        }

4.搜索

           s = Request["pnx"];

            x = Request["txt"];

            try

            {

                if (s == "全部")

                {

                    string str = @"Data Source=WIN7U-20111109S\SQLEXPRESS;Initial Catalog=duoduo;Integrated Security=True";

                    SqlConnection conn = new SqlConnection(str);

                    conn.Open();

                    SqlCommand sql1 = new SqlCommand("select * from Book ", conn);

                    int count = Convert.ToInt32(sql1.ExecuteScalar());

                    if (count > 0)

                    {

                        sql2 = "select * from Book ";

                    }

                    else

                    {

                        Response.Write("<script>alert('对不起!网站还没有任何小说!');location.href='Default.aspx';</script>");

                    }

                }

                else if (s == "书名")

                {

                    string str = @"Data Source=WIN7U-20111109S\SQLEXPRESS;Initial Catalog=duoduo;Integrated Security=True";

                    SqlConnection conn = new SqlConnection(str);

                    conn.Open();

                    SqlCommand sql1 = new SqlCommand("select * from Book where BookName='" + x.Trim() + "'", conn);

                    int count = Convert.ToInt32(sql1.ExecuteScalar());

                    if (count > 0)

                    {

                        sql2 = "select BookID,Picture,BookName,People,Jianjie from Book where BookName='" + x.Trim() + "'";

                    }

                    else

                    {

                        Response.Write("<script>alert('对不起!网站还没有任何小说!');location.href='Default.aspx';</script>");

                    }

                }

                else

                {

                    string str = @"Data Source=WIN7U-20111109S\SQLEXPRESS;Initial Catalog=duoduo;Integrated Security=True";

                    SqlConnection conn = new SqlConnection(str);

                    conn.Open();

                    SqlCommand sql1 = new SqlCommand("select * from Book where People='" + x.Trim() + "'", conn);

                    int count = Convert.ToInt32(sql1.ExecuteScalar());

                    if (count > 0)

                    {

                        sql2 = "select BookID,Picture,BookName,People,Jianjie from Book where People='" + x.Trim() + "'";

                    }

                    else

                    {

                        Response.Write("<script>alert('对不起!你查找的图书不存在!');location.href='Default.aspx';</script>");

                    }

                }

                Dan();

            }

            catch (Exception ex)

            {

                Response.Write(ex.Message);

            }

5.分页

public void Dan()

    {

        try

        {

            string str = @"Data Source=WIN7U-20111109S\SQLEXPRESS;Initial Catalog=duoduo;Integrated Security=True";

            SqlConnection conn = new SqlConnection(str);

            conn.Open();

            SqlDataAdapter da = new SqlDataAdapter(sql2, conn);

            da.Fill(ds, "book");

            PagedDataSource pds = new PagedDataSource();

            pds.DataSource = ds.Tables["book"].DefaultView;

            pds.AllowPaging = true;

            pds.PageSize = 5;

            pds.CurrentPageIndex = Convert.ToInt32(this.Label4.Text) - 1;

            this.LinkButton30.Enabled = true;

            this.LinkButton31.Enabled = true;

            this.LinkButton32.Enabled = true;

            this.LinkButton33.Enabled = true;

            if (Convert.ToInt32(this.Label4.Text) == 1)

            {

                this.LinkButton30.Enabled = false;

                this.LinkButton31.Enabled = false;

            }

            if (Convert.ToInt32(this.Label4.Text) == pds.PageCount)

            {

                this.LinkButton32.Enabled = false;

                this.LinkButton33.Enabled = false;

            }

            this.Label5.Text = Convert.ToString(pds.PageCount);

            this.DataList1.DataSource = pds;

            this.DataList1.DataKeyField = "BookID";

            this.DataList1.DataBind();

            conn.Close();

        }

        catch (Exception ex)

        {

            Response.Write(ex.Message);

        }

}

6.最近阅读

try

        {

            string str = @"Data Source=WIN7U-20111109S\SQLEXPRESS;Initial Catalog=duoduo;Integrated Security=True";

            SqlConnection conn = new SqlConnection(str);

            conn.Open();

            SqlCommand sql1 = new SqlCommand("select * from Ydls where UserID=(select UserID from Users where UserName='"+Session["u"]+"')", conn);

            int count = Convert.ToInt32(sql1.ExecuteScalar());

            if (count > 0)

            {

                sql2 = "SELECT  top 10 Ydls.ydID,Book.Picture ,Book.BookName , Book.People ,Book.Jianjie,Ydls.Datetime FROM Ydls INNER JOIN Book on Ydls.BookID=Book.BookID INNER JOIN Users on Ydls.UserID=Users.UserID and Ydls.UserID=(select UserID from Users where UserName='"+Session["u"]+"')  ORDER BY Datetime DESC";

            }

            else

            {

                Response.Write("<script>alert('对不起!您还没有阅读过任何小说!看看我们为你推荐的小说吧');location.href='cnxh.aspx';</script>");

            }

            Dan();

        }

        catch (Exception ex)

        {

            Response.Write(ex.Message);

        }

7.点击小说名进行在线阅读

if (Session["u"] != null)

        {

            if (e.CommandName == "tiaozhuan")

            {

                string ss = ((LinkButton)e.Item.FindControl("LinkButton36")).Text.ToString();

                try

                {

                    string str = @"Data Source=WIN7U-20111109S\SQLEXPRESS;Initial Catalog=duoduo;Integrated Security=True";

                    SqlConnection conn = new SqlConnection(str);

                    conn.Open();

                    SqlCommand sql1 = new SqlCommand("insert into Ydls(BookID,UserID,Datetime)values((select BookID from Book where BookName='" + ss + "'),(select UserID from Users where UserName='" + Session["u"] + "'),'" + DateTime.Now.ToLocalTime().ToString() + "') ", conn);

                    sql1.ExecuteNonQuery();

                    SqlCommand sql4 = new SqlCommand("update Book set Dianji+=" + 1 + " where BookName='" + ss + "'", conn);

                    sql4.ExecuteNonQuery();

                    conn.Close();

                }

                catch (Exception ex)

                {

                    Response.Write(ex.Message);

                }

                Response.Redirect("ydxs.aspx?txt=" + ss.Trim() + "");

            }

        }

        else

        {

            Response.Write("<script>alert('对不起!您必须登录之后才能阅读小说!');</script>");

        }

8.最近更新

  try

        {

            string str = @"Data Source=WIN7U-20111109S\SQLEXPRESS;Initial Catalog=duoduo;Integrated Security=True";

            SqlConnection conn = new SqlConnection(str);

            conn.Open();

            SqlCommand sql1 = new SqlCommand("select * from Book", conn);

            int count = Convert.ToInt32(sql1.ExecuteScalar());

            if (count > 0)

            {

                sql2 = "SELECT top 10 BookID,Picture ,BookName , People ,Jianjie FROM Book ORDER BY Date DESC";

            }

            else

            {

                Response.Write("<script>alert('对不起!最近没有更新任何小说!');location.href='Default.aspx';</script>");

            }

            Dan();

        }

        catch (Exception ex)

        {

            Response.Write(ex.Message);

        }

9.猜你喜欢

try

        {

            string str = @"Data Source=WIN7U-20111109S\SQLEXPRESS;Initial Catalog=duoduo;Integrated Security=True";

            SqlConnection conn = new SqlConnection(str);

            conn.Open();

            SqlCommand sql1 = new SqlCommand("select * from Ydls where UserID=(select UserID from Users where UserName='" + Session["u"] + "')", conn);

            int count = Convert.ToInt32(sql1.ExecuteScalar());

            if (count > 0)

            {

                sql2 = "select *  from Book where exists(select top 10 BookClassID,count(BookClassID)from Ydls,Book where Exists(select  BookID from Ydls where exists(select * from Users where UserName='"+Session["u"]+"') )and Book.BookID=Ydls.BookID group by BookClassID order by COUNT(BookClassID)  desc) order by Dianji desc";

            }

            else

            {

                SqlCommand sql3 = new SqlCommand("select * from Book", conn);

                int count1 = Convert.ToInt32(sql3.ExecuteScalar());

                if (count1 > 0)

                {

                    sql2 = "select top 10 * from Book  ORDER BY Dianji DESC";                 

                }

                else

                {

                    Response.Write("<script>alert('对不起!本站还没有任何图书推荐给你!');location.href='Default.aspx';</script>");

                }

            }

            Dan();

        }

        catch (Exception ex)

        {

            Response.Write(ex.Message);

        }

10.排行

try

        {

            string str = @"Data Source=WIN7U-20111109S\SQLEXPRESS;Initial Catalog=duoduo;Integrated Security=True";

            SqlConnection conn = new SqlConnection(str);

            conn.Open();

            SqlCommand sql1 = new SqlCommand("select * from Book", conn);

            int count = Convert.ToInt32(sql1.ExecuteScalar());

            if (count > 0)

            {

                sql2 = "SELECT  BookID,Picture ,BookName , People ,Jianjie FROM Book ORDER BY Dianji DESC";

            }

            else

            {

                Response.Write("<script>alert('对不起!最近没有更新任何小说!');location.href='Default.aspx';</script>");

            }

            Dan();

        }

        catch (Exception ex)

        {

            Response.Write(ex.Message);

        }

11.留言

if (Session["u"] == null)

        {

            Response.Write("<script>alert('对不起,必须登录之后才能留言!');</script>");

        }

        else

        {

            if (this.TextBox5.Text != "")

            {

                if (this.TextBox2.Text != "")

                {

                    try

                    {

                        string str = @"Data Source=WIN7U-20111109S\SQLEXPRESS;Initial Catalog=duoduo;Integrated Security=True";

                        SqlConnection conn = new SqlConnection(str);

                        conn.Open();

                        SqlCommand sql = new SqlCommand("select * from LeaveWord where Desn='" + TextBox5.Text.Trim() + "'", conn);

                        int count = Convert.ToInt32(sql.ExecuteScalar());

                        if (count > 0)

                        {

                            Response.Write("<script>alert('对不起!标题重复,请选择其他标题!');</script>");

                            this.TextBox5.Text = "";

                        }

                        else

                        {

                            SqlCommand sqlcm = new SqlCommand("insert into LeaveWord(Desn,Body,Date,UserID)values('" + this.TextBox5.Text + "','" + this.TextBox2.Text.Trim() + "','" + DateTime.Now.ToLocalTime().ToString() + "',(select UserID from Users where UserName='"+Session["u"]+"'))", conn);

                            sqlcm.ExecuteNonQuery();

                            conn.Close();

                            Response.Write("<script>alert('恭喜您!留言成功,谢谢您对多多小说网的大力支持!!!');</script>");

                            this.TextBox2.Text = "";

                            this.TextBox5.Text = "";

                        }

                    }

                    catch (Exception ex)

                    {

                        Response.Write(ex.Message);

                    }

                }

                else

                {

                    Response.Write("<script>alert('请输入内容!!!');</script>");

                }

            }

            else

            {

                Response.Write("<script>alert('请输入标题!!!');</script>");

            }

        }

12.分类浏览

  if (!Page.IsPostBack)

        {

            s = Request["pnx"];

            try

            {

                string str = @"Data Source=WIN7U-20111109S\SQLEXPRESS;Initial Catalog=duoduo;Integrated Security=True";

                SqlConnection conn = new SqlConnection(str);

                conn.Open();

                SqlCommand sql1 = new SqlCommand("select * from Book where BookName='" + s.Trim() + "'", conn);

                int count = Convert.ToInt32(sql1.ExecuteScalar());

                if (count > 0)

                {

                    sql2 = "select BookID,Picture,BookName,People,Jianjie from Book where BookName='" + s.Trim() + "'";

                }

                else

                {

                    Response.Write("<script>alert('对不起!网站还没有该本小说!');</script>");

                    Server.Transfer("Default.aspx");

                }

                Dan();

            }               

            catch (Exception ex)

            {

                Response.Write(ex.Message);

            }

        }

13.查看留言

try

        {

            string str = @"Data Source=WIN7U-20111109S\SQLEXPRESS;Initial Catalog=duoduo;Integrated Security=True";

            SqlConnection conn = new SqlConnection(str);

            conn.Open();

            SqlCommand sql1 = new SqlCommand("select * from LeaveWord", conn);

            int count = Convert.ToInt32(sql1.ExecuteScalar());

            if (count > 0)

            {

                sql2 = "select LeaveWord.LeaveWordID,LeaveWord.Desn,LeaveWord.Body,LeaveWord.Date,Users.UserName from Users,LeaveWord where Users.UserID=LeaveWord.UserID";

            }

            else

            {

                Response.Write("<script>alert('对不起!网站还没有任何留言!');</script>");

            }

            Dan();

        }

        catch (Exception ex)

        {

            Response.Write(ex.Message);

        }

14.阅读小说

s = Request["txt"];

        try

        {

            string str = @"Data Source=WIN7U-20111109S\SQLEXPRESS;Initial Catalog=duoduo;Integrated Security=True";

            SqlConnection conn = new SqlConnection(str);

            conn.Open();

            SqlCommand sql1 = new SqlCommand("select * from Book where BookName='" + s.Trim() + "'", conn);

            int count = Convert.ToInt32(sql1.ExecuteScalar());

            if (count > 0)

            {

                SqlCommand sql2 = new SqlCommand("select * from Book where BookName='" + s.Trim() + "'", conn);

                SqlDataReader read = sql1.ExecuteReader();

                read.Read();

                this.Label2.Text = s;

                this.Label3.Text = read["People"].ToString();

                this.Label4.Text = read["Date"].ToString();

                x = read["neirong"].ToString();

                StreamReader sr = new StreamReader(System.Web.HttpContext.Current.Server.MapPath(x),System.Text.Encoding.Default);

                TextBox5.Text = sr.ReadToEnd();

                sr.Close(); 

            }

            else

            {

            }

        }

        catch (Exception ex)

        {

            Response.Write(ex.Message);

        }

系统集成:

  说明集成方式和出现的问题及解决办法

根据最近青少年的需求,我们设计了这款功能强大的小说网 对于计算机的要求不高只要能上网就行。在设计时我们遇到了前所未有的麻烦,如:SQL语句掌握不熟练、心算法不懂等。经过看书、上网查资料等方式终于圆满的完成了设计。

实训心得及总结:

     说明你在这次实训中的心得。

总结你的实训收获和找出个人的不足,再进一步充实的地方。

经过此次实训 我们更加的熟悉了SQL语句  知道了学习的重要性  还要多多的复习就得识

我们这次实训在SQL语句的使用和核心算法的了解还不怎么熟悉  我们应该多多了解算与算法的设计

教师评语:

 

 


文档说明:

1.        项目要求具有一定的实用价值

2.        正文用仿宋五号字,行距20

3.        总字数不得少于4000字。

4.        需要分析和系统设计部分,小组成员相同,系统实现部分写个人完成的部分。

 

 

更多相关推荐:
我做的PHOTOSHOP实验报告参考

实验报告一实验目的与要求掌握Photoshop的各种基本操作技巧并能够灵活使用处理各种文字图像二实验原理工具Photoshop软件中的钢笔工具移动工具缩放工具等命令调整抠出图片大小调整图层位置抠出所需图片将图片...

photoshop图像处理实验报告

云南大学软件学院实验报告序号:31实验老师:**实验名称:图像处理课程名称:数字媒体技术实验学号:***姓名:**一.实验名称:图像处理:二.实验目的:◆认识图像处理的原理并初步使用常用的图像处理工具Photo…

实验报告ps

甘肃政法学院本科学生实验报告姓名景红玉学院计算机科学学院专业计算机科学与技术班级20xx专升本实验课程名称多媒体技术及应用指导教师及职称王云峰开课时间20xx20xx学年一学期甘肃政法学院教务处印制

ps实验报告

一Photoshop的基本操作学号20xx12103姓名王胜楠专业电子信息工程成绩实验目的学习了Photoshop软件的基本工具后能运用软件结合自己的设计理念制作一个综合性作品实验内容要求能从不同图片中选取所需...

photoshop实验报告

景德镇陶瓷学院设计艺术学院实验报告课程名称计算机辅导设计姓名陈泽宇学号20xx10113304专业班级11装潢3班成绩教师魏文卿实验项目名称Photoshop基础知识与基本操作基本功能高级功能高级编辑技巧实验学...

ps实验报告

实验报告理工类20xx至20xx学年度第1学期课程名称图像处理系别班级经济贸易系10电子商务2班学号1004131008姓名章亚建授课教师周艳燕指导教师周艳燕实验项目一奥运五环制作三基色调制同组者填写日期实验日...

photoshop实验报告

景德镇陶瓷学院设计艺术学院实验报告课程名称photoshop姓名韩璐学号20xx10113421专业班级装潢四班成绩教师魏文卿实验项目名称Photoshop基础知识与基本操作基本功能高级功能高级编辑技巧实验学时...

简易photoshop代码数字图像处理实验报告

一一个简单的photoshop软件二设计目的数字图像处理就是用数字计算机及其他有关数字技术对图像进行处理以达到预期的目的随着计算机的发展图像处理技术在许多领域得到了广泛应用数字图像处理已成为电子信息通信计算机自...

ps实验报告创建和编辑选区(此轮的绘制)

XXX学院XX系实验报告20xx20xx学年第一学期课程名称photoshop平面设计实验名称创建和编辑选区专业年级学号姓名指导教师实验日期

ps实验报告 认识photoshop cs3

教育信息技术与传媒学院InstituteofEducationalInformationTechnologyandCommunication平面设计PhotoShop实验报告学号姓名日期教师评语日期年月日

实验报告ps化妆品

海南软件职业技术学院学生实验报告说明1学生必须认真地按照教师和实验要求填写学生实验报告2指导教师评语一栏由指导教师填写成绩评定为优良合格不合格四个等级其余栏目由学生本人填写

迷宫问题和过河问题实验报告

天津外国语大学国际商学院本科生课程论文课程名称论文题目姓名学号专业班级任课教师数据结构实验报告杨丽文1407114036信息管理与信息系统14707王斌老师20xx年6月年级14级目录一研究问题4二研究思路4三...

ps实验报告(31篇)