Click here to Skip to main content
15,885,366 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
i have created one menu with repeater control.there are so many hyperllink.if anyone of hyperinks is clicked this below procedure is called.if any one hyperlink is clicked an error occurs with a message that @ProductID which was not supplied.my question is how to supplllied id.


objCmd.CommandType = CommandType.StoredProcedure;
objCmd.CommandText = "PR_PrductShow_SelectByPrimaryKey";
Posted

1 solution

you can send storedprocedure parameters various ways. One example like
C#
objCmd.Parameters.Add(new SqlParameter("@ProductID", 1001));
 
Share this answer
 
Comments
Ankit Gajera 17-Mar-13 0:42am    
What is 1001 here..is this Port number??
S. M. Ahasan Habib 17-Mar-13 8:44am    
this is product number
Ankit Gajera 18-Mar-13 6:40am    
ok, thanx a lot fr help me...

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


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