我正在为我的应用程序使用 3 层架构。我正在使用内联代码来调用业务逻辑中的某些方法。我有一个返回特定字符串消息的方法。以下代码返回错误
<div id="logo">
<h1><a href="/" title='<%= systemMessagesBL.ReturnMessage("MSG_MAINPAGE_TOOLTIP", 1) %>'>Application</a></h1>
</div>
错误是:CS0103: The name 'systemMessagesBL' does not exist in the current context
。虽然我已经使用以下嵌入式代码引用了它:
<% BusinessLogic.SystemMessagesBL systemMessagesBL = new BusinessLogic.SystemMessagesBL(); %>
可能是什么问题?