Click here to Skip to main content
12,063,645 members (70,151 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: ASP.NET
Can anyone give solution?

give stored procedure for shopping cart details?here i don't know how to do?
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 23-Nov-11 21:49pm
Edited 23-Nov-11 22:07pm
thatraja247.4K
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.
mark merrens 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

Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

  Permalink  

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

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web02 | 2.8.160204.4 | Last Updated 24 Nov 2011
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100