I want to create an asp.net web forms website that has a products page. I want to create a products.aspx page that has a specific layout and there I want to demonstrate the products. So in the url I will have something like www.mysite.gr/products.aspx?productid=1 In other words I want to display different content according to the id from the query string parameter. Please can you propose me some ways to do this and also if you know provide some links that I can study?
I want to create an asp.net web forms website that has a products page.
Share
Depending on how your site is laid out and how your project is built, there are various ways to approach this. For example, you can get the value of the QueryString like this:
Then, as a simple example, you can add the relevant details. For example, lets say you’ve got a product class from your
GetProdutData()method. You can then fill out the elements on your page with the relevant data.This is just one approach and there are various others, such as using the MVC pattern.