Click here to Skip to main content
15,890,995 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
here i attach a code for if i'm selecting one category from bulleted list it will show image,price,name for items in particular category....
i try following code it shows error...
can anyone solve it and it entirly wrong means pls giv me correct coding for that.

Error Code:


protected void BulletedList1_Click(object sender, BulletedListEventArgs e)
    {
        categ(cat_name);
    }
    public void categ(string cat_name)
    {
        if (con.State == ConnectionState.Closed)
        {
            con.Open();
        }
        SqlCommand cmd = new SqlCommand("select pro_img,pro_name,price from product where pro_category='books'", con);
        SqlDataAdapter da = new SqlDataAdapter(cmd);
        DataSet ds = new DataSet();
        da.Fill(ds);
        BulletedList1.DataSource = ds;
        BulletedList1.DataBind();
        con.Close();
    }
Posted
Updated 18-Nov-11 17:27pm
v2
Comments
Dr.Walt Fair, PE 18-Nov-11 23:45pm    
Is there any particular error code it is giving? On which line of code?
M.Narmatha 18-Nov-11 23:49pm    
no...

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900