I have my master pages created nicely in the templates section of umbraco, is it possible to add code behind to these master pages? If so, what is the best way to add it?
The best way is to do this in Visual Studio. You can then include the master page created in Umbraco in your solution, and normally adding a class file with the same name as your master page + ".cs" extension should do the trick.
Adding Code Behind to the Master pages
Hi all,
I have my master pages created nicely in the templates section of umbraco, is it possible to add code behind to these master pages? If so, what is the best way to add it?
thanks
Louis
Hi Louis,
The best way is to do this in Visual Studio. You can then include the master page created in Umbraco in your solution, and normally adding a class file with the same name as your master page + ".cs" extension should do the trick.
There are some posts explaining how to setup a Visual Studio solution for Umbraco, and there is even a package that creates a basic "Umbraco Visual Studio Solution". You can check it, it might be a good start for what you are trying to do : http://our.umbraco.org/projects/developer-tools/visual-studio-2010-project-template
Cheers,
Michael.
is working on a reply...