Skip to main content
added 228 characters in body
Source Link
ccook
  • 5.9k
  • 6
  • 57
  • 82

The included script references, in particular jQuery, are being rendered after viewstate. Is there a way to get this in the < head>?

Page.ClientScript.RegisterClientScriptInclude("jQuery", "/scripts/jquery.js");

I am trying to register jquery.js in a user control's page load.

Thanks in advance!

P.S. If it can't be done (with ClientScript), anyone have an idea why they didn't build it in?

UPDATE

The main feature of the ClientScript manager I need is the ability to only include a script once. The control can appear many times on a page, but i only want one jQuery script include

The included script references, in particular jQuery, are being rendered after viewstate. Is there a way to get this in the < head>?

Page.ClientScript.RegisterClientScriptInclude("jQuery", "/scripts/jquery.js");

I am trying to register jquery.js in a user control's page load.

Thanks in advance!

P.S. If it can't be done, anyone have an idea why they didn't build it in?

The included script references, in particular jQuery, are being rendered after viewstate. Is there a way to get this in the < head>?

Page.ClientScript.RegisterClientScriptInclude("jQuery", "/scripts/jquery.js");

I am trying to register jquery.js in a user control's page load.

Thanks in advance!

P.S. If it can't be done (with ClientScript), anyone have an idea why they didn't build it in?

UPDATE

The main feature of the ClientScript manager I need is the ability to only include a script once. The control can appear many times on a page, but i only want one jQuery script include

added 84 characters in body
Source Link
ccook
  • 5.9k
  • 6
  • 57
  • 82

The included script references, in particular jQuery, are being rendered after viewstate. Is there a way to get this in the < head>?

Page.ClientScript.RegisterClientScriptInclude("jQuery", "/scripts/jquery.js");

I am trying to register jquery.js in a user control's page load.

Thanks in advance!

P.S. If it can't be done, anyone have an idea why they didn't build it in?

The included script references, in particular jQuery, are being rendered after viewstate. Is there a way to get this in the < head>?

Page.ClientScript.RegisterClientScriptInclude("jQuery", "/scripts/jquery.js");

I am trying to register jquery.js in a user control's page load.

Thanks in advance!

The included script references, in particular jQuery, are being rendered after viewstate. Is there a way to get this in the < head>?

Page.ClientScript.RegisterClientScriptInclude("jQuery", "/scripts/jquery.js");

I am trying to register jquery.js in a user control's page load.

Thanks in advance!

P.S. If it can't be done, anyone have an idea why they didn't build it in?

Source Link
ccook
  • 5.9k
  • 6
  • 57
  • 82

How to get Page.ClientScript.RegisterClientScriptInclude to include in the head?

The included script references, in particular jQuery, are being rendered after viewstate. Is there a way to get this in the < head>?

Page.ClientScript.RegisterClientScriptInclude("jQuery", "/scripts/jquery.js");

I am trying to register jquery.js in a user control's page load.

Thanks in advance!