在我的aspx页面中说Parent.aspx
,我们访问后面代码中定义的protected
变量。
例如:Parent.aspx
<div id="rp_chat_btn_container" class="grid-4 chat-btn-container <%=isChatBtnOnRight ? "btn--rearrange" : "" %>">
这绝对好用。现在在aspx页面中,我包括另一个aspx页面,说child.aspx
。在我访问相同的变量。
Parent.aspx
<!-- #include file=/used/Child.aspx -->
Child.aspx
<div class="grid-4 chat-btn-container contact-seller-chat <%=isChatBtnOnRight ? "btn--rearrange" : "" %>">
在发布模式下构建时。我收到以下错误消息:
Child.aspx(108):错误BC30198:“)”。 [D:\ JenkinsUtilities \ Feature_Testing \ codecheckout \ Organisation \ Organisation.UI.csproj]
Parent.aspx
中没有显示错误。我想访问包含的aspx页面(Child.aspx)中相同的受保护变量
答案 0 :(得分:0)
我严重怀疑您的错误是由于aspx页面的声明引起的。 error BC30198
通常是由于任何使用的函数中的语法错误而引起的。从aspx页面调用.cs代码的位置仔细检查。如果使用任何内置函数,请在目标框架中仔细检查函数的语法。某些功能在.net框架的较新版本中已弃用语法。