Files
mono/mcs/class/System.Web/System.Web.UI.WebControls/FormParameter.cs
T
Ben Maurer d0ac8392d4 2003-11-17 Ben Maurer <[email protected]>
* StateManagedCollection.cs: Implement.

2003-11-17 Ben Maurer  <[email protected]>

	* ControlParameter.cs:
	* CookieParameter.cs:
	* FormParameter.cs:
	* Parameter.cs:
	* QueryStringParameter.cs: New v2 files. Mostly
	implemented, still need a few methods.

svn path=/trunk/mcs/; revision=20146
2003-11-17 23:03:01 +00:00

64 lines
1.2 KiB
C#

//
// System.Web.UI.WebControls.FormParameter
//
// Authors:
// Ben Maurer ([email protected])
//
// (C) 2003 Ben Maurer
//
#if NET_1_2
using System.Collections;
using System.Collections.Specialized;
using System.Text;
namespace System.Web.UI.WebControls {
public class FormParameter : Parameter {
protected FormParameter (FormParameter original) : base (original)
{
this.FormField = original.FormField;
}
public FormParameter (string name, string formField) : base (name)
{
FormField = formField;
}
public FormParameter (string name, TypeCode type, string formField) : base (name, type)
{
FormField = formField;
}
protected override Parameter Clone ()
{
return new FormParameter (this);
}
protected override object Evaluate (Control control)
{
if (control == null || control.Page == null || control.Page.Request == null)
return null;
return control.Page.Request.Form [FormField];
}
public string FormField {
get {
string s = ViewState ["FormField"] as string;
if (s != null)
return s;
return "";
}
set {
if (FormField != value) {
ViewState ["FormField"] = value;
OnParameterChanged ();
}
}
}
}
}
#endif