|
|
@@ -65,9 +65,7 @@ namespace System.Web.UI
|
|
|
const string hiddenField = "hiddenField";
|
|
|
const string arrayDeclaration = "arrayDeclaration";
|
|
|
const string scriptBlock = "scriptBlock";
|
|
|
-#if NET_3_5
|
|
|
const string scriptStartupBlock = "scriptStartupBlock";
|
|
|
-#endif
|
|
|
const string expando = "expando";
|
|
|
const string onSubmit = "onSubmit";
|
|
|
const string asyncPostBackControlIDs = "asyncPostBackControlIDs";
|
|
|
@@ -97,9 +95,7 @@ namespace System.Web.UI
|
|
|
List<UpdatePanel> _panelsToRefresh;
|
|
|
List<UpdatePanel> _updatePanels;
|
|
|
ScriptReferenceCollection _scripts;
|
|
|
-#if NET_3_5
|
|
|
CompositeScriptReference _compositeScript;
|
|
|
-#endif
|
|
|
ServiceReferenceCollection _services;
|
|
|
bool _isInAsyncPostBack;
|
|
|
bool _isInPartialRendering;
|
|
|
@@ -335,7 +331,6 @@ namespace System.Web.UI
|
|
|
return _scripts;
|
|
|
}
|
|
|
}
|
|
|
-#if NET_3_5
|
|
|
[PersistenceMode (PersistenceMode.InnerProperty)]
|
|
|
[Category ("Behavior")]
|
|
|
[DefaultValue (null)]
|
|
|
@@ -348,7 +343,6 @@ namespace System.Web.UI
|
|
|
return _compositeScript;
|
|
|
}
|
|
|
}
|
|
|
-#endif
|
|
|
[PersistenceMode (PersistenceMode.InnerProperty)]
|
|
|
[DefaultValue ("")]
|
|
|
[MergableProperty (false)]
|
|
|
@@ -404,10 +398,8 @@ namespace System.Web.UI
|
|
|
|
|
|
[Category ("Action")]
|
|
|
public event EventHandler<ScriptReferenceEventArgs> ResolveScriptReference;
|
|
|
-#if NET_3_5
|
|
|
[Category ("Action")]
|
|
|
public event EventHandler<CompositeScriptReferenceEventArgs> ResolveCompositeScriptReference;
|
|
|
-#endif
|
|
|
public static ScriptManager GetCurrent (Page page) {
|
|
|
if (page == null)
|
|
|
throw new ArgumentNullException ("page");
|
|
|
@@ -594,12 +586,10 @@ namespace System.Web.UI
|
|
|
if (IsMultiForm)
|
|
|
RegisterScriptReference (this, ajaxWebFormsExtensionScript, true);
|
|
|
}
|
|
|
-#if NET_3_5
|
|
|
if (_compositeScript != null && _compositeScript.HaveScripts ()) {
|
|
|
OnResolveCompositeScriptReference (new CompositeScriptReferenceEventArgs (_compositeScript));
|
|
|
RegisterScriptReference (this, _compositeScript, true);
|
|
|
}
|
|
|
-#endif
|
|
|
// Register Scripts
|
|
|
if (_scriptToRegister != null)
|
|
|
for (int i = 0; i < _scriptToRegister.Count; i++)
|
|
|
@@ -756,14 +746,12 @@ namespace System.Web.UI
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-#if NET_3_5
|
|
|
protected virtual void OnResolveCompositeScriptReference (CompositeScriptReferenceEventArgs e)
|
|
|
{
|
|
|
EventHandler <CompositeScriptReferenceEventArgs> evt = ResolveCompositeScriptReference;
|
|
|
if (evt != null)
|
|
|
evt (this, e);
|
|
|
}
|
|
|
-#endif
|
|
|
protected virtual void OnResolveScriptReference (ScriptReferenceEventArgs e) {
|
|
|
if (ResolveScriptReference != null)
|
|
|
ResolveScriptReference (this, e);
|
|
|
@@ -1428,14 +1416,12 @@ namespace System.Web.UI
|
|
|
else
|
|
|
WriteCallbackOutput (output, scriptBlock, scriptContentWithTags, SerializeScriptBlock (scriptEntry));
|
|
|
break;
|
|
|
-#if NET_3_5
|
|
|
case RegisteredScriptType.ClientStartupScript:
|
|
|
if (scriptEntry.AddScriptTags)
|
|
|
WriteCallbackOutput (output, scriptStartupBlock, scriptContentNoTags, scriptEntry.Script);
|
|
|
else
|
|
|
WriteCallbackOutput (output, scriptStartupBlock, scriptContentWithTags, SerializeScriptBlock (scriptEntry));
|
|
|
break;
|
|
|
-#endif
|
|
|
case RegisteredScriptType.ClientScriptInclude:
|
|
|
WriteCallbackOutput (output, scriptBlock, scriptPath, scriptEntry.Url);
|
|
|
break;
|