In Sitecore how can I access all statically bound sublayouts from the code behind of an ASCX or and ASPX without knowing the ids?
In Sitecore how can I access all statically bound sublayouts from the code behind
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Or with LINQ:
UPDATE:
I was trying to do this recently by getting the
HtmlHeadcontrol, so I wrote a blog post on how to do it. I just realized you can do something similar for sublayouts.Here’s a utility method to get controls on the page by their type: