Click here to Skip to main content
11,477,625 members (70,629 online)
Rate this: bad
good
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
thatraja245.8K
v3
Comments
Anuja Pawar Indore at 24-Nov-11 2:54am
   
Not a question.
OriginalGriff at 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 at 24-Nov-11 3:08am
   
Are you unable to create a stored procedure? What have you tried for yourself?
Prince Antony G at 24-Nov-11 3:08am
   
Give more explaniation.
what is ur requirement..
sathiyak at 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
0 Sergey Alexandrovich Kryukov 274
1 Richard Deeming 245
2 _duDE_ 175
3 Tomas Takac 150
4 Sascha Lefèvre 145
0 Sergey Alexandrovich Kryukov 7,675
1 OriginalGriff 7,256
2 Sascha Lefèvre 3,034
3 Maciej Los 2,491
4 Richard Deeming 2,305


Advertise | Privacy | Mobile
Web02 | 2.8.150520.1 | Last Updated 24 Nov 2011
Copyright © CodeProject, 1999-2015
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