Custom section - cannot reference ui controls in code-behind
I've followed the usual steps for creating a custom section in Umbraco (umbracoApp, umbracoAppTree, user permissions), created a separate project and included the usual references.
Think my issue is due to how I am inheriting from umbracoPage.Master.
I changed the MasterPageFile="../../../masterpages/umbracoPage.Master" to MasterPageFile="../masterpages/umbracoPage.Master" and I was able to correctly reference the ui controls in the code-behind.
I then reverted back to MasterPageFile="../../../masterpages/umbracoPage.Master" due to the file structure I was using and all worked as expected and then has stopped working again.
Custom section - cannot reference ui controls in code-behind
I've followed the usual steps for creating a custom section in Umbraco (umbracoApp, umbracoAppTree, user permissions), created a separate project and included the usual references.
Below is a simple page for the custom section
In the code-behind, I'm unable to reference the Repeater. Not sure what I've missed - any ideas?
Umbraco 4.7.2
.Net Framework 4
Hmm you should be able to find the controls in the code behind. Here is an example I wrote which might help: http://our.umbraco.org/wiki/reference/umbraco-best-practices/standard-ui-controls/umbracouicontrols-page-samples
Jeroen
Think my issue is due to how I am inheriting from umbracoPage.Master.
I changed the MasterPageFile="../../../masterpages/umbracoPage.Master" to MasterPageFile="../masterpages/umbracoPage.Master" and I was able to correctly reference the ui controls in the code-behind.
I then reverted back to MasterPageFile="../../../masterpages/umbracoPage.Master" due to the file structure I was using and all worked as expected and then has stopped working again.
Any ideas?
The issue is still apparent. I can now reference the .NET controls but I am unable to reference the Umbraco controls.
I created a new page, and I am unable to reference .NET or Umbraco controls. Not sure what I am missing so any help would be much appreciated?
I came across the answer here http://stackoverflow.com/questions/5405311/cant-access-umbraco-uicontrols
I needed to add a reference to the ClientDependency.Core.dll which then allowed me to reference .NET and Umbraco controls in the code-behind.
Hope this helps anyone else who comes across this issue.
is working on a reply...