I am developing a Visual C# and ASP.NET E-commerce web application. I have used a Datalist to populate information from my SQL database within Visual Studio.
I only want to display specific products on a new page after the button (btnAddToBasket) has been clicked.
For example, on my PlayStation web page, if the user clicks the button under the first product, then I only want the title, image, and price to be displayed on a new page for that specific product.
Here is the ASP.NET code I have used for my data List:
According to your description, as far as I know, you want to show this product information in new page when you click this button. I think you could try the following steps:
1. When you click this page, you could get the ID of the product.
2. Then pass this ID as parameter in URL or other method.
3. In the new page, you could use ado to select data from database through ID in page load event.
4. show data in the new page.
Best Regards,
Eric Du
MSDN Community Support
Please remember to click "Mark as Answer" the responses that resolved your issue.
If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.
Member
1 Points
10 Posts
Data List - display only specific products on new page
Mar 15, 2017 11:40 AM|JonnyH91|LINK
Hi,
I am developing a Visual C# and ASP.NET E-commerce web application. I have used a Datalist to populate information from my SQL database within Visual Studio.
I only want to display specific products on a new page after the button (btnAddToBasket) has been clicked.
For example, on my PlayStation web page, if the user clicks the button under the first product, then I only want the title, image, and price to be displayed on a new page for that specific product.
Here is the ASP.NET code I have used for my data List:
Does anyone have any suggestions on how I could resolve this issue?
Kind Regards,
Jonathan
Contributor
6730 Points
2715 Posts
Re: Data List - display only specific products on new page
Mar 16, 2017 07:23 AM|Eric Du|LINK
Hi JonnyH91,
According to your description, as far as I know, you want to show this product information in new page when you click this button. I think you could try the following steps:
1. When you click this page, you could get the ID of the product.
2. Then pass this ID as parameter in URL or other method.
3. In the new page, you could use ado to select data from database through ID in page load event.
4. show data in the new page.
Best Regards,
Eric Du
Please remember to click "Mark as Answer" the responses that resolved your issue.
If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.