Getting the Project/App Name Programatically
Hi,
How do I programtically get the current project name in SiteFinity ?
Thanks in advance,
Jon
Hi Jon,
You can do this from the configuration
var name = Telerik.Sitefinity.Configuration.Config.Get<ProjectConfig>().ProjectName;
All the best,
Ivan Dimitrov
the Telerik team
thks ..
jon
Any chance we can get the project name on the client side?
Any chance we can get the project name on the client side?
You can do that easy enough in your masterpage, just dump it into an <asp:HiddenField somewhere on your page
I'd rather they didn't automatically do this :)
Hi,
You need to send it from the server to the client reading the configuration as shown above. I don't think that we store it somewhere on the client.
Regards,
Ivan Dimitrov
the Telerik team
Ivan,
I just tried this in the code behind of my master page and I'm getting : The type or namespace name 'ProjectConfig' could not be found (are you missing a using directive or an assembly reference?)
Any thoughts?
Hello,
You need to add the following reference:
using
Telerik.Sitefinity.Project.Configuration;