Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I am looking at the old REPORTCENTER onet.xml file in SharePoint 2010's 14 hive (SharePoint Root). I noticed the following in this file:

    <Configuration ID="1" Name="Blank">
        <ExecuteUrl Url="_layouts/[%=System.Threading.Thread.CurrentThread.CurrentUICulture.LCID%]/settings.aspx" />
    </Configuration>

The [%=%] syntax jumped out at me. I assume these are "dynamic" tokens used to access static properties/methods on public classes. The question is, are these run at provisioning time, or at runtime? Also, is this token syntax only available within the <ExecuteUrl> element, or is it available from other elements? Is there documentation on this syntax?

share|improve this question
    
This isn't necessarily CAML but rather a call into a .NET class so I removed those references from your question. –  Alex Angas Aug 29 '11 at 9:27
    
I've only ever seen the square bracket syntax myself in CAML (the angle bracket & percentage symbol being the standard ASP.NET escape sequence). –  James Love Oct 12 '11 at 7:22
add comment

1 Answer

The [%= is essentially the same thing as using <%= to insert a line of .NET code into an ASP.NET page. There it is simply grabbing the value of "System.Threading.Thread.CurrentThread.CurrentUICulture.LCID" which I believe it to identify the language code (i.e. 1033 for English). The only examples where I see that this appears for SharePoint is in the XML template files for site definitions, etc.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.