Click here to Skip to main content
15,883,887 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
See more:
Can anyone give solution?

give stored procedure for shopping cart details?here i don't know how to do?
C#
protected void btncart_Click(object sender, EventArgs e)
    {
        if (con.State == ConnectionState.Closed)
        {
            con.Open();
        }
        SqlCommand cmd = new SqlCommand("addcart1", con);
        cmd.CommandType = CommandType.StoredProcedure;
        cmd.Parameters.AddWithValue("@mastreid",OleDbType.VarChar,50);
        cmd.Parameters.AddWithValue("@usersession");
        cmd.Parameters.AddWithValue("@pro_id");
        cmd.Parameters.AddWithValue("@pro_name");
        cmd.Parameters.AddWithValue("@price");
        cmd.Parameters.AddWithValue("@quantity");
        cmd.Parameters.AddWithValue("@type");
        cmd.Parameters.AddWithValue("@pro_img");
        cmd.ExecuteNonQuery();

    }
Posted
Updated 23-Nov-11 21:07pm
v3
Comments
Anuja Pawar Indore 24-Nov-11 2:54am    
Not a question.
OriginalGriff 24-Nov-11 3:00am    
We would need more information that that. What exactly are you trying to do? What part of that is giving you difficulties?
Use the "Improve question" widget to edit your question and provide better information.
R. Giskard Reventlov 24-Nov-11 3:08am    
Are you unable to create a stored procedure? What have you tried for yourself?
Prince Antony G 24-Nov-11 3:08am    
Give more explaniation.
what is ur requirement..
sathiyak 24-Nov-11 3:12am    
here i have create the stored procedure but in the add cart button i use this sp but for addcart i have no forms.....pls can anyone understand?

1 solution

 
Share this answer
 

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