日期:2014-05-17  浏览次数:20530 次

App_Code中定义的类在aspx文件中如何引用
如我在App_Code中定义了一个URLManage的类,在Index文件中引用此类
代码如下:

<div class="top_side">
                <ul>
                    <li id="liLogin"><a href='<%=URLManage.GetURL("~/Member/MemberLogin","")%>'>登录</a> |
                    </li>
                    <li><a href='<%=URLManage.GetURL("~/Member/RegisterMember","")%>'>注册</a></li>
                    <li>|<a href='<%=URLManage.GetURL("~/Member/MemberInfo","")%>'><label id="lbUserNameInfo"></label>个人信息</a>
                    </li>
                    <li>|<a href='<%=URLManage.GetURL("~/Member/Collection","")%>'>我的收藏夹</a> </li>
                    <li>|<a href='<%=URLManage.GetURL("~/Member/ShopingCart","")%>'>我的购物车</a> </li>
                    <li>|<a href='<%=URLManage.GetURL("~/Member/OrderManage","")%>'>我的订单</a> </li>
                    <li>|<a href='<%=URLManage.GetURL("~/Comments/WebComment","")%>'>总站留言</a> </li>
                    <li>|<a href='<%=URLManage.GetURL("~/Search/SearchProduct","")%>'>找找看</a> </li>
                    <li id="liLogout">|<a id="A2" href='<%=ResolveUrl("Member/Data/GetMemberInfo.ashx?method=MemberLogout")%>'>安全退出</a></li>
                </ul>
            </div>



运行时提示
编译器错误消息: CS0103: 当前上下文中不存在名称“URLManage”

源错误:

 

行 16:             <div class="top_side">
行 17:                 <ul>
行 18:                     <li id="liLogin"><a href='<%=URLManage.GetURL("~/Member/MemberLogin","")%>'>登录</a> |
行 19:                     </li>
行 20:                     &l