I am new to Tridion development and I have the first βmainβ problem. I wrote a simple C # code snippet in TBB (using a text editor of content) and I tried to use the fields for the engine, package and log (since, as I know, they are accessible by Tridion), but I get the error "name does not exist in the context". Here is the code:
<%@ Page Language="C#" ContentType="text/html" ResponseEncoding="utf-8" %> <div> Go to @@ location@ @<br/> </div> <% String ts = DateTime.Now.ToString("d MMM yyyy"); Response.Write("<br/>"+ts); engine.getSession(); %>
When I save TBB and publish the page, I get this error:
Compilation Error Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately. Compiler Error Message: CS0103: The name 'engine' does not exist in the current context Source Error: Line 31: Response.Write("<br/>"+ts); Line 32: engine.getSession(); Line 33: %> Line 34: </div> Source File: c:\inetpub\wwwroot\stage\pj\ricerca\ricerca.aspx Line: 32
Perhaps I missed something or something was wrong, did someone recognize the problem?
source share