var userid = '<%=((YS.WebPub.pubSession)Session["pubSession"]).UID%>'; //当前登录用户的ID报错:找不到YS.WebPub这个命名空间:
(注:YS.WebPub 是个类库DLL,Using 已引用过)
请高人指点!!!!

解决方案 »

  1.   

    web项目添加了这个引用没?
      

  2.   

    你可以在当前页面写一个输出属性,例如protect string UID
    {
        get{ return ........}
    }然后在你的服务器端 xhtml 中直接引用这个属性。要把复杂的表达式隐藏起来。
      

  3.   

    protected string UID
    {
        get { return 复杂表达式; }
    }所有的绑定都应该分层、封装。
      

  4.   

    测试了,你这么玩没问题,重新引用下DLL。或者重启VS,或者重新发布,应该是vs编译器的事
      

  5.   

    using YS.WebPub;
    using YS.DBUtility;namespace YS.Web
    {
        public partial class Default : System.Web.UI.Page
        {
            protected string Nav = string.Empty;
            protected void Page_Load(object sender, EventArgs e)
            {
                if (((YS.WebPub.pubSession)Session["pubSession"]).logined == 0)
                {
                    Response.Write("<script>top.location.href='/login.aspx' </script>");
                    return;
                }            if (!IsPostBack)
                {
                    BindNav();
                }
            }                            在ASP代码页面里能引用到的,就是在网页"源"页面代码里引用不到
      

  6.   

    删过也没用的,怪的,就是在网页    SCript  里引用不到
      

  7.   


    重新引用下DLL。或者重启VS,或者重新发布,应该是vs编译器的事