How to include jquery in masterpage header without path problems?

前端 未结 2 325
野趣味
野趣味 2021-01-21 08:09

I have tried this


Back Office


        
2条回答
  •  南方客
    南方客 (楼主)
    2021-01-21 08:51

    Try using DataBinding with ResolveUrl

    
    

    Then in your code behind call the Header's Databind

        protected override void OnInit(EventArgs e)
        {
            base.OnInit(e);
            Page.Header.DataBind();
        }
    

    If you start getting errors regarding the ViewState you may need to disable it on the header.

    
    

提交回复
热议问题