and an empty scriptfile (to minimize error possibilities)
This gives the error:
Error
Loading Razor Script (file: ) The file
"~/App_Data/TEMP/Razor/list.cshtml" could not be rendered, because it
does not exist or is not a valid page. at
System.Web.WebPages.Util.EnsureValidPageType(WebPageBase page, String
virtualPath)
I think the reason is you use inline razor macro. all the inline macro(razor) will store in the ~/App_Data/TEMP/Razor. So the engine will treat this folder as default folder.
If you use a normal macro(Not inline), and you don't need to point out the file path.
Renderpage from within template
I got an inline razor script in my template. This inline script should call a scripting file.
So basicly is I have the template:
and an empty scriptfile (to minimize error possibilities)
This gives the error:
try this one:
@RenderPage("~/macroscripts/list.cshtml")
And put file(list.cshtml) into macroscripts folder
Great :-) I indeed needed to put the path to the file in there. Is it me but shouldn't that be resolved by umbraco?
I think the reason is you use inline razor macro. all the inline macro(razor) will store in the ~/App_Data/TEMP/Razor. So the engine will treat this folder as default folder.
If you use a normal macro(Not inline), and you don't need to point out the file path.
is working on a reply...