I followed this article instructional steps from 1 to 7
https://knowledgebase.progress.com/articles/Article/page-appears-blank-to-non-admin-users
Ok, but I have the different case. On that Working page
I have placed two layout controls 100%
, then I want to get this controls from the code, BUT they are missing.
In the most of the examples in the documentation and knowledge base, they show the following code lines to access that layout controls:
var layoutControlOnPage = pageData.Controls
.FirstOrDefault(c => c.ObjectType == typeof(LayoutControl).FullName);
BUT in my case, layoutControlOnPage
is always NULL. I cannot access any of the Layout controls. The code above is executed from .aspx
web form page.
Here are some resources:
https://docs.sitefinity.com/overview-create-pages/for-developers-adding-layout-controls-to-pages-and-page-templates
https://knowledgebase.progress.com/articles/Article/get-placeholders-of-feather-grid-layout-controls
Is it that because the page is without page-template (The page template is set to Empty (start from scratch)
)?
I post this question here because I hope someone to help me. In the Sitefinity forums, I wouldn't receive any help.
I will try this in another project and will update this soon
Update:
I have tested the same code on another sitefinity project and I am able to access the the layout controls from the code.
Any Ideas how to access in the layout controls and what prevents me to access them?