I am constructing a simple site using vs.net and c# and would like to use a datagrid on two seperate webforms to display master/details of products. I am using a stored procedure on the details page but can not figure out how that can pick up the querystring. Any help appreciated.<BR><BR>my stored procedure is :<BR>SELECT id, title, description, price, picture, subcategory<BR>FROM products<BR>and then obviously i want it to pick up :<BR>Where products.id = Request.QueryString["id"]<BR><BR>Can I set a parameter and have the stored proc pick it up from the code behind....???<BR><BR>if so how do you assign a parameter for a stored proc on a code behind page??<BR><BR>This is driving me round the bend
....sorry if it's an easy one to all u guru's but i would appreciate some help figuring this one out' Get the querystring value<BR>Dim queryID As Integer = CInt(HttpContext.Current.Request("id"))<BR><BR>' Create your connection and set your commandtype to storeprocedure<BR><BR>' Add your parameters<BR>Dim parameterID As SqlParameter = New SqlParameter("@ID", SqlDbType.Int, 4)<BR>parameterID.Value = http://aspmessageboard.com/archive/index.php/queryID<BR>myCommand.Parameters.Add(parameterID)<BR><BR>Check out the iBuySpyStore documentation, it's loaded with stored procs...<BR>http://www.ibuyspystore.com/vbdocs/docs/docs.htmMany thanks.....
