Ejemplo n.º 1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Request.QueryString["book_id"] == null)
        {
            Response.Redirect("index.aspx");
        }
        else
        {
            BookBL bookBL = new BookBL();
            FormView1.DataSource = bookBL.product(Request.QueryString["book_id"].ToString());
            FormView1.DataBind();

            string author = ((HyperLink)FormView1.FindControl("HyperLink4")).Text.ToString();
            Label15.Text         = author;
            DataList1.DataSource = bookBL.authorBook(author);
            DataList1.DataBind();

            //書籍內容
            FormView2.DataSource = bookBL.product(Request.QueryString["book_id"].ToString());
            FormView2.DataBind();


            //書籍簡介
            FormView3.DataSource = bookBL.product(Request.QueryString["book_id"].ToString());
            FormView3.DataBind();

            //留言板
            GridView1.DataSource = bookBL.product_message(Request.QueryString["book_id"].ToString());
            GridView1.DataBind();
        }
    }