Files
mono/mcs/class/System.Web/System.Web.UI.HtmlControls/HtmlInputFile.cs
T
Gonzalo Paniagua Javier 26c28da391 2002-09-23 Gonzalo Paniagua Javier <[email protected]>
* HtmlAnchor.cs:
	* HtmlButton.cs:
	* HtmlContainerControl.cs:
	* HtmlControl.cs:
	* HtmlForm.cs:
	* HtmlGenericControl.cs:
	* HtmlImage.cs:
	* HtmlInputButton.cs:
	* HtmlInputCheckBox.cs:
	* HtmlInputControl.cs:
	* HtmlInputFile.cs:
	* HtmlInputHidden.cs:
	* HtmlInputImage.cs:
	* HtmlInputRadioButton.cs:
	* HtmlInputText.cs:
	* HtmlSelect.cs:
	* HtmlTable.cs:
	* HtmlTableCell.cs:
	* HtmlTableRow.cs:
	* HtmlTextArea.cs: added almost all missing attributes.

svn path=/trunk/mcs/; revision=7740
2002-09-23 17:59:02 +00:00

89 lines
2.1 KiB
C#
Executable File

/* System.Web.UI.HtmlControls
* Authors
* Leen Toelen ([email protected])
*/
using System;
using System.ComponentModel;
using System.Web;
using System.Web.UI;
using System.Globalization;
using System.Collections.Specialized;
namespace System.Web.UI.HtmlControls{
[ValidationProperty("Value")]
public class HtmlInputFile : HtmlInputControl, IPostBackDataHandler{
public HtmlInputFile():base("file"){}
bool IPostBackDataHandler.LoadPostData (string postDataKey,
NameValueCollection postCollection)
{
string postValue = postCollection [postDataKey];
if (postValue != null)
Value = postValue;
return false;
}
void IPostBackDataHandler.RaisePostDataChangedEvent ()
{
}
[DefaultValue("")]
[WebCategory("Behavior")]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public string Accept{
get{
string attr = Attributes["accept"];
if (attr != null)
return attr;
return String.Empty;
}
set{
Attributes["accept"] = AttributeToString(value);
}
}
[DefaultValue("")]
[WebCategory("Behavior")]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public int MaxLength{
get{
string attr = Attributes["maxlength"];
if (attr != null)
return Int32.Parse(attr, CultureInfo.InvariantCulture);
return -1;
}
set{
Attributes["accept"] = AttributeToString(value);
}
}
[DefaultValue("")]
[WebCategory("Appearance")]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public int Size{
get{
string attr = Attributes["size"];
if (attr != null)
return Int32.Parse(attr, CultureInfo.InvariantCulture);
return -1;
}
set{
Attributes["size"] = AttributeToString(value);
}
}
[DefaultValue("")]
[WebCategory("Misc")]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public HttpPostedFile PostedFile{
get{
return Context.Request.Files[RenderedName];
}
}
} // class HtmlInputFile
} // namespace System.Web.UI.HtmlControls