Hello, I want to register a jquery-script dynamically on a master page, but it doesn´t work, can anybody help me?
I got the script in a folder Materials/Scripts from the root of my web application, and my master page looks like
public partial class Application : System.Web.UI.MasterPage
{
protected void Page_Load(object sender, EventArgs e)
{
ScriptManager.RegisterClientScriptInclude(this, this.GetType(), "jquery",
VirtualPathUtility.ToAbsolute("~/Materials/Scripts/jquery-1.4.2.min.js"));
}
}
But this never works. Using
<script src="../../Materials/Scripts/jquery-1.4.2.min.js" type="text/javascript"></script>
works fine.