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


C# HtmlTextWriterAttribute类代码示例

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


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

示例1: AddAttribute

		protected override void AddAttribute (string name, string value, HtmlTextWriterAttribute key)
		{
			output.WriteLine ("{0:###0} AddAttribute ({1}, {2}, {3}))", NextIndex (), name, value, key);
			if (full_trace)
				WriteTrace (new StackTrace ());

			base.AddAttribute (name, value, key);
		}
开发者ID:nobled,项目名称:mono,代码行数:8,代码来源:HtmlWriter.cs

示例2: PendingAttribute

		public PendingAttribute (string name, string value, HtmlTextWriterAttribute a, bool encode, bool know_encode)
		{
			this.name = name;
			this.value = value;
			this.a = a;
			this.encode = encode;
			this.know_encode = know_encode;
		}
开发者ID:nobled,项目名称:mono,代码行数:8,代码来源:CleanHtmlTextWriter.cs

示例3: AddAttribute

 public override void AddAttribute(HtmlTextWriterAttribute key, string value)
 {
     if (((key == HtmlTextWriterAttribute.Src) || (key == HtmlTextWriterAttribute.Href)) || (key == HtmlTextWriterAttribute.Background))
     {
         base.AddAttribute(key.ToString(), value, key);
     }
     else
     {
         base.AddAttribute(key, value);
     }
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:11,代码来源:DesignTimeHtmlTextWriter.cs

示例4: AddAttribute

        public override void AddAttribute(HtmlTextWriterAttribute key, string value)
        {
            if (multiValueAttrs != null && multiValueAttrs.Contains(key))
            {
                if (!attrValues.ContainsKey(key))
                    attrValues.Add(key, new List<string>());

                attrValues[key].Add(value);
            }
            else
            {
                base.AddAttribute(key, value);
            }
        }
开发者ID:AbdoNile,项目名称:Foundation,代码行数:14,代码来源:NavHtmlTextWritter.cs

示例5: AddAttribute

        public override void AddAttribute(HtmlTextWriterAttribute key, string value)
        {
            if (_allowedMultiValueAttrs.Contains(key))
            {
                if (!_attrValues.ContainsKey(key))
                    _attrValues.Add(key, new List<string>());

                _attrValues[key].Add(value);
            }
            else
            {
                base.AddAttribute(key, value);
            }
        }
开发者ID:siranen,项目名称:SystemSnapshotWebServer,代码行数:14,代码来源:HtmlTextWritterEx.cs

示例6: OnAttributeRender

 protected override bool OnAttributeRender(string name, string value, HtmlTextWriterAttribute key)
 {
     Hashtable hashtable = (Hashtable) this._recognizedAttributes[base.TagName];
     if ((hashtable == null) || (hashtable[name] == null))
     {
         if (this._globalSuppressedAttributes[name] != null)
         {
             return false;
         }
         Hashtable hashtable2 = (Hashtable) this._suppressedAttributes[base.TagName];
         if ((hashtable2 != null) && (hashtable2[name] != null))
         {
             return false;
         }
     }
     return true;
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:17,代码来源:ChtmlTextWriter.cs

示例7: OnAttributeRender

        /// <devdoc>
        /// Override to filter out unnecessary attributes
        /// </devdoc>
        protected override bool OnAttributeRender(string name, string value, HtmlTextWriterAttribute key) {
            Hashtable elementRecognizedAttributes = (Hashtable)_recognizedAttributes[TagName];
            if (elementRecognizedAttributes != null && elementRecognizedAttributes[name] != null) {
                return true;
            }
            
            if (_globalSuppressedAttributes[name] != null) {
                return false;
            }
            
            Hashtable elementSuppressedAttributes = (Hashtable)_suppressedAttributes[TagName];
            if (elementSuppressedAttributes != null && elementSuppressedAttributes[name] != null) {
                return false;
            }

            return true;
        }
开发者ID:nlh774,项目名称:DotNetReferenceSource,代码行数:20,代码来源:ChtmlTextWriter.cs

示例8: Attr

 /// <summary>
 /// Applies the value to the specified attribute to the HtmlTextWriter
 /// this instance contains.
 /// </summary>
 /// <param name="key">The attribute to set.</param>
 /// <param name="value">The value to set to the attribute.</param>
 /// <returns>The attribute manager.</returns>
 public HtmlAttributeManager Attr(HtmlTextWriterAttribute key, string value)
 {
     Writer.AddAttribute(key, value);
     return this;
 }
开发者ID:draizada,项目名称:IZWebFileManager,代码行数:12,代码来源:HtmlAttributeManager.cs

示例9: AddAttribute

 public override void AddAttribute(HtmlTextWriterAttribute key, String value)
 {
     if (HasRenderedFirstTag) {
         base.AddAttribute(key, value);
     } else if (key == HtmlTextWriterAttribute.Onclick) {
         value +=
             ";(function(e){" +
               "setTimeout(function(){" +
                 "e.disabled=(window.Page_IsValid !== true) ? false : (e.form && e.form.checkValidity && e.form.checkValidity());" +
               "}, 0);" +
             "})(this);";
         base.AddAttribute(key, value);
     } else {
         base.AddAttribute(key, value);
     }
 }
开发者ID:devhost,项目名称:Corelicious,代码行数:16,代码来源:CustomButton.cs

示例10: OnAttributeRender

 protected virtual bool OnAttributeRender(string name, string value, HtmlTextWriterAttribute key) {
     return true;
 }
开发者ID:JokerMisfits,项目名称:linux-packaging-mono,代码行数:3,代码来源:HTMLTextWriter.cs

示例11: IsAttributeDefined

 protected bool IsAttributeDefined(HtmlTextWriterAttribute key) {
     for (int i = 0; i < _attrCount; i++) {
         if (_attrList[i].key == key) {
             return true;
         }
     }
     return false;
 }
开发者ID:JokerMisfits,项目名称:linux-packaging-mono,代码行数:8,代码来源:HTMLTextWriter.cs

示例12: EncodeAttributeValue

        protected virtual string EncodeAttributeValue(HtmlTextWriterAttribute attrKey, string value) {
            bool encode = true;

            if (0 <= (int)attrKey && (int)attrKey < _attrNameLookupArray.Length) {
                encode = _attrNameLookupArray[(int)attrKey].encode;
            }

            return EncodeAttributeValue(value, encode);
        }
开发者ID:JokerMisfits,项目名称:linux-packaging-mono,代码行数:9,代码来源:HTMLTextWriter.cs

示例13: AddAttribute

 protected virtual void AddAttribute(string name, string value, HtmlTextWriterAttribute key) {
     AddAttribute(name, value, key, false, false);
 }
开发者ID:JokerMisfits,项目名称:linux-packaging-mono,代码行数:3,代码来源:HTMLTextWriter.cs

示例14: GetAttributeName

 protected string GetAttributeName(HtmlTextWriterAttribute attrKey)
 {
     if ((attrKey >= HtmlTextWriterAttribute.Accesskey) && (attrKey < _attrNameLookupArray.Length))
     {
         return _attrNameLookupArray[(int) attrKey].name;
     }
     return string.Empty;
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:8,代码来源:HtmlTextWriter.cs

示例15: RegisterAttribute

        private static void RegisterAttribute(string name, HtmlTextWriterAttribute key, bool encode, bool isUrl) {
            string nameLCase = name.ToLower(CultureInfo.InvariantCulture);

            _attrKeyLookupTable.Add(nameLCase, key);

            if ((int)key < _attrNameLookupArray.Length) {
                _attrNameLookupArray[(int)key] = new AttributeInformation(name, encode, isUrl);
            }
        }
开发者ID:JokerMisfits,项目名称:linux-packaging-mono,代码行数:9,代码来源:HTMLTextWriter.cs


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