Developer forum

Forum » Development » Getting current ProductID in UserControl

Getting current ProductID in UserControl

Dmitrij Jazel
Reply

Hi guys,

Would love to get some help on this one, hopefully :-)

I am in a situation where I MUST use custom .net usercontrol here, I am including this control into the Ecommerce product template.

So when I am in ecommerce, when I am looking at the product (in the frontend) I include my user control there.

And so I was wondering, if there is a way for me to access ProductID inside that user control.

 

Regards,

Dmitrij

 

 

 

 

 

 

 

 

 

 


Replies

 
Mikkel Ricky
Reply

You should be able to get it from the request:

System.Web.HttpContext.Current.Request.QueryString["ProductID"]

Best regards,
Mikkel

 

 
Dmitrij Jazel
Reply

Hej Mikkel,

nice! :-))) Thanks allot! this made the trick :-)

This is how I used it :-)

Dynamicweb.Input.Request("ProductID");

 

 

 

 

 

You must be logged in to post in the forum