System.Web.UI.ControlBuilder.GetAttribute C# (CSharp) Method

GetAttribute() private method

private GetAttribute ( string name ) : string
name string
return string
		internal string GetAttribute (string name)
		{
			if (attribs == null)
				return null;

			return attribs [name] as string;
		}

Usage Example

Example #1
0
		void RegisterBindingInfo (ControlBuilder builder, string propName, ref string value)
		{
			string str = TrimDB (value, false);
			if (StrUtils.StartsWith (str, "Bind", true)) {
				Match match = bindRegex.Match (str);
				if (match.Success) {
					string bindingName = match.Groups [1].Value;
					TemplateBuilder templateBuilder = builder.ParentTemplateBuilder;
					
					if (templateBuilder == null)
						throw new HttpException ("Bind expression not allowed in this context.");

					if (templateBuilder.BindingDirection == BindingDirection.OneWay)
						return;
					
					string id = builder.GetAttribute ("ID");
					if (String.IsNullOrEmpty (id))
						throw new HttpException ("Control of type '" + builder.ControlType + "' using two-way binding on property '" + propName + "' must have an ID.");
					
					templateBuilder.RegisterBoundProperty (builder.ControlType, propName, id, bindingName);
				}
			}
		}
All Usage Examples Of System.Web.UI.ControlBuilder::GetAttribute