hey, im currently creating an e-commerce store, im quite new to ASP.NET and C#. im trying to create a menu that is generated based on the database tables. i have created a stored procedure, which works correctly:
ALTER PROCEDURE dbo.getProductsForCat
AS
SELECT * FROM products_cat WHERE product_cat_id IN
( SELECT product_cat_id FROM products )
SELECT p.product_id, p.product_name,p.product_cat_id FROM products p
RETURN
im not too sure how to bind the results to some kind of html output. im unsure if the code below is in the right direction?
using (api_prodDataContext api = new api_prodDataContext())
{
var results = from u in api.getProductsForCat()
select u;
foreach (var details in results)
{
//some code?
}
any help with this issue would be much much appreciated.:icon_cool: