当前位置: 首页>>代码示例>>C#>>正文


C# UI.ScriptReference类代码示例

本文整理汇总了C#中System.Web.UI.ScriptReference的典型用法代码示例。如果您正苦于以下问题:C# ScriptReference类的具体用法?C# ScriptReference怎么用?C# ScriptReference使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


ScriptReference类属于System.Web.UI命名空间,在下文中一共展示了ScriptReference类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: OnLoad

        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);
            if (string.IsNullOrEmpty(Path))
            {
                throw new ArgumentException("Script property must have a value");
            }

            var manager = ScriptManager.GetCurrent(Page);
            if (manager == null)
            {
                throw new ArgumentException("No script manager found for the current page. Have you added a ScriptManager to the master page?");
            }

            System.Web.UI.ScriptReference scriptReference;
            if (IsEmbedded)
            {
                var parentBaseType = Parent.GetType().BaseType;
                var scriptResourcePrefix = parentBaseType.Namespace;
                var scriptResourcePath = string.Format("{0}.{1}", scriptResourcePrefix, Path);
                var assemblyName = parentBaseType.Assembly.GetName().Name;
                scriptReference = new System.Web.UI.ScriptReference(scriptResourcePath, assemblyName);
            }
            else
            {
                scriptReference = new System.Web.UI.ScriptReference(Path);
            }

            manager.Scripts.Add(scriptReference);
        }
开发者ID:joakes,项目名称:ExtensibleWebFeatures,代码行数:30,代码来源:ScriptReference.cs

示例2: GetScriptReferences

        protected override IEnumerable<ScriptReference> GetScriptReferences()
        {
            ScriptReference reference = new ScriptReference();
            reference.Path = ResolveClientUrl("FocusBehavior.js");

            return new ScriptReference[] { reference };
        }
开发者ID:nobled,项目名称:mono,代码行数:7,代码来源:FocusExtender.cs

示例3: GetScriptReferences

        protected virtual IEnumerable<ScriptReference> GetScriptReferences()
        {
            ScriptReference reference = new ScriptReference();
             reference.Path = ResolveClientUrl("~/Scripts/jquery.maskedinput.min.js");

             return new ScriptReference[] { reference };
        }
开发者ID:ArquitecturaSoftware,项目名称:texfinadev,代码行数:7,代码来源:esdMaskedTextBox.cs

示例4: GetScriptReferences

 protected virtual IEnumerable<ScriptReference> GetScriptReferences()
 {
     ScriptReference reference = new ScriptReference();
     //reference.Path = ResolveClientUrl("~/scripts/progress.js");
     reference.Path = "~/scripts/progress.js";
     return new ScriptReference[] { reference };
 }
开发者ID:Confirmit,项目名称:Portal,代码行数:7,代码来源:UpdateProgressStatus.cs

示例5: GetScriptReferences

        protected virtual IEnumerable<ScriptReference> GetScriptReferences()
        {
            ScriptReference reference = new ScriptReference();
            reference.Path = ResolveClientUrl("SampleTextBox.js");

            return new ScriptReference[] { reference };
        }
开发者ID:nobled,项目名称:mono,代码行数:7,代码来源:SampleTextBox.cs

示例6: GetScriptReferences

        protected override IEnumerable<ScriptReference> GetScriptReferences()
        {
            ScriptReference reference = new ScriptReference();
            reference.Assembly = "AjaxButton";
            reference.Name = "AjaxButton.FocusHighlighter.js";

            return new ScriptReference[] { reference };
        }
开发者ID:robbytarigan,项目名称:EtCeteraBoilerPlate,代码行数:8,代码来源:FocusHighlighter.cs

示例7: GetScriptReferences

		protected override IEnumerable<ScriptReference> GetScriptReferences()
		{
			ScriptReference reference = new ScriptReference();
			reference.Assembly = "PermissionCenter";
			reference.Name = "PermissionCenter.PcGridHoverBehavior.js";

			return new ScriptReference[] { reference };
		}
开发者ID:jerryshi2007,项目名称:AK47Source,代码行数:8,代码来源:DeluxeGridHoverExtender.cs

示例8: ScriptReference

        IEnumerable<ScriptReference> IScriptControl.GetScriptReferences()
        {
            ScriptReference reference = new ScriptReference();
            reference.Assembly = "AjaxEnabled";
            reference.Name = "AjaxEnabled.PassTextBox.js";

            return new ScriptReference[] { reference };
        }
开发者ID:robbytarigan,项目名称:EtCeteraBoilerPlate,代码行数:8,代码来源:PassTextBox.cs

示例9: GetScriptReferences

        /// <summary>
        /// Gets the script references.
        /// </summary>
        /// <returns></returns>
        protected override IEnumerable<ScriptReference> GetScriptReferences()
        {
            ScriptReference reference = new ScriptReference();

            reference.Path = this.Page.ClientScript.GetWebResourceUrl(this.GetType(), "Mediachase.Ibn.Assignments.UI.Scripts.Hider.js");

            return new ScriptReference[] { reference };
        }
开发者ID:0anion0,项目名称:IBN,代码行数:12,代码来源:HiderExtender.cs

示例10: GetScriptReferences

 /// <summary>
 /// Gets the script references.
 /// </summary>
 /// <returns></returns>
 public override IEnumerable<ScriptReference> GetScriptReferences()
 {
     string assembly = typeof(TwitterDesigner).Assembly.FullName;
     var scripts = new List<ScriptReference>(base.GetScriptReferences());
     var designerScript = new ScriptReference(TwitterDesigner.designerScriptName, assembly);
     scripts.Add(designerScript);
     return scripts.ToArray();
 }
开发者ID:jrcollado1987,项目名称:Telerik.Sitefinity.Samples.RealEstate,代码行数:12,代码来源:TwitterDesigner.cs

示例11: OpenScriptReference

 public OpenScriptReference(ScriptReference reference) : base() {
     Assembly = reference.Assembly;
     IgnoreScriptPath = reference.IgnoreScriptPath;
     Name = reference.Name;
     NotifyScriptLoaded = false;
     Path = reference.Path;
     ResourceUICultures = reference.ResourceUICultures;
     ScriptMode = reference.ScriptMode;
 }
开发者ID:sanyaade-mobiledev,项目名称:ASP.NET-Mvc-2,代码行数:9,代码来源:OpenScriptReference.cs

示例12: Register

        //public const string JQueryUrl = "http://code.jquery.com/jquery-1.8.3.min.js";
        public static void Register(ScriptManager scriptManager)
        {
            // Check if JQuery has been added before
            if (scriptManager.Scripts.FirstOrDefault(s => s.Path == JQueryUrl) != null)
            {
                return;
            }

            var sr = new ScriptReference(JQueryUrl);
            scriptManager.Scripts.Add(sr);
        }
开发者ID:skyquery,项目名称:graywulf,代码行数:12,代码来源:JQuery.cs

示例13: GetDefinition

 public ScriptResourceDefinition GetDefinition(ScriptReference scriptReference) {
     if (scriptReference == null) {
         throw new ArgumentNullException("scriptReference");
     }
     string name = scriptReference.Name;
     Assembly assembly = null;
     ScriptResourceDefinition definition = null;
     if (!String.IsNullOrEmpty(name)) {
         assembly = scriptReference.GetAssembly();
         definition = ScriptManager.ScriptResourceMapping.GetDefinition(name, assembly);
     }
     return definition;
 }
开发者ID:nlh774,项目名称:DotNetReferenceSource,代码行数:13,代码来源:ScriptResourceMapping.cs

示例14: GetScriptReferences

        protected override IEnumerable<ScriptReference> GetScriptReferences()
        {
            var script1 = new ScriptReference
            {
                Assembly = this.GetType().Assembly.FullName,
                Name = "Msts.Scripts.Chapter09.PasswordLengthValidator.js"
            };
            var script2 = new ScriptReference
            {
                Assembly = this.GetType().Assembly.FullName,
                Name = "Msts.Scripts.Chapter09.PasswordLengthBehavior.js"
            };

            return new[] { script1, script2 };
        }
开发者ID:jupaol,项目名称:LearningProjects,代码行数:15,代码来源:PasswordLengthBehavior.cs

示例15: GetScriptReferences

        public IEnumerable<ScriptReference> GetScriptReferences()
        {
            var script1 = new ScriptReference
            {
                Assembly = this.GetType().Assembly.FullName,
                Name = "Msts.Scripts.Chapter09.PasswordLengthValidator.js"
            };
            var script2 = new ScriptReference
            {
                Assembly = this.GetType().Assembly.FullName,
                Name = "Msts.Scripts.Chapter09.PasswordLengthControl.js"
            };

            return new[] { script1, script2 };
        }
开发者ID:jupaol,项目名称:LearningProjects,代码行数:15,代码来源:PasswordLengthControl.cs


注:本文中的System.Web.UI.ScriptReference类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。