Castle.MonoRail.Framework.Helpers.FormHelper.HiddenField C# (CSharp) Method

HiddenField() public method

Generates a hidden form element.

The value is extracted from the target (if available)

public HiddenField ( string target, IDictionary attributes ) : string
target string The object to get the value from and to be based on to create the element name.
attributes IDictionary Attributes for the FormHelper method and for the html element it generates
return string
		public string HiddenField(string target, IDictionary attributes)
		{
			target = RewriteTargetIfWithinObjectScope(target);

			object value = ObtainValue(target);
			
			string id = CreateHtmlId(attributes, target);
			
			value = value != null ? value : String.Empty;

			return CreateInputElement("hidden", id, target, value.ToString(), attributes);
		}
		

Same methods

FormHelper::HiddenField ( string target ) : string
FormHelper::HiddenField ( string target, object value ) : string
FormHelper::HiddenField ( string target, object value, IDictionary attributes ) : string