You can only have one <head runat="server">

Posted by Community Admin on 04-Aug-2018 06:48

You can only have one control on a page.

All Replies

Posted by Community Admin on 20-Dec-2015 00:00

I was adding new MVC controllers to my project (I already have a few working fine) and now my project won't display any public page using  an MVC based layout.  Regular page templates work fine, but any use of MVC templates including the built-in ones results in the "You can only have one <head runat="server"> control on a page." error message.  Of course I deleted any new code from after the error message started appearing, but the error is not going away.  Of course I can't find any <head runat="server" code in my project at all.   

Posted by Community Admin on 20-Dec-2015 00:00

Okay I figured out what the issues was (sort of). My scaffolding added files under the MVC/Views folder. Removing these fixed the issue. I am not sure why as I was not using any of those, but SF didn't like them being there 

This thread is closed