protected void Page_Load(object sender, EventArgs e)
    {
        PRODUCT_ID = Request.QueryString["pid"];

        string query = "SELECT * FROM product_tbl WHERE Id = '" + PRODUCT_ID + "'";

        dr = con.fetch(query);
        dr.Read();
        //Response.Write("<script>alert('" + dr["product_name"].ToString() + "');</script>");
        producttitle.InnerText = dr["product_name"].ToString();
        productprice.InnerText = "$" + dr["product_price"].ToString();
        //productdescription.InnerText = dr["product_description"].ToString();
        con.con.Close();
    }
Пример #2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        PRODUCT_ID = Request.QueryString["eid"];

        SqlDataReader dr = con.fetch("SELECT * FROM product_tbl LEFT JOIN category_tbl ON product_tbl.cat_id = category_tbl.Id WHERE product_tbl.Id = '" + PRODUCT_ID + "'");

        dr.Read();
        productNamee.Text     = dr["product_name"].ToString();
        productPricee.Text    = dr["product_price"].ToString();
        cat_idd.SelectedValue = dr["cat_id"].ToString();
        img.ImageUrl          = dr["product_image"].ToString();
        productId.Text        = dr["Id"].ToString();
        //Response.Write("<script>alert('" + dr["product_name"].ToString() + "');</script>");
        con.con.Close();
    }