Portal Engine Questions on portal engine and web parts.
Version 5.x > Portal Engine > Programmatically Accessing a Webpart by its ID View modes: 
User avatar
Member
Member
ArifKhan - 3/2/2010 1:05:43 AM
   
Programmatically Accessing a Webpart by its ID
In a webpart zone, I have 2 webparts. Can I get to the instance of one webpart from the other?

Say by using something like Page.FindControl() or similar to CMSControlsHelper.GetFilter but returning an instance of CMSAbstractWebPart.

Thanks!

User avatar
Kentico Developer
Kentico Developer
kentico_martind - 3/5/2010 2:45:01 AM
   
RE:Programmatically Accessing a Webpart by its ID
Hello,

You could use approach described in How to get value from control placed in master page KB article. You can add web part to RequestStockHelper and then get instance of it in second web part. You will just need to call SetFilter earlier than GetFilter.

Best Regards,

Martin Dobsicek