mirror of
https://github.com/BepInEx/mono.git
synced 2026-11-16 17:10:20 -10:00
* ControlParameter.cs:
* CookieParameter.cs:
* FormParameter.cs:
* QueryStringParameter.cs:
* SessionParameter.cs: added public .ctor ()
* Parameter.cs: added public .ctor (), internal SetOwnerCollection
and handling, as well as internal ParameterValue for easy access.
NOTE: ParameterValue doesnt respect TreatEmptyStringAsNull yet.
* ParameterCollection.cs: implementation redux.
svn path=/trunk/mcs/; revision=20213
70 lines
1.4 KiB
C#
70 lines
1.4 KiB
C#
//
|
|
// System.Web.UI.WebControls.QueryStringParameter
|
|
//
|
|
// 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 QueryStringParameter : Parameter {
|
|
|
|
public QueryStringParameter () : base ()
|
|
{
|
|
}
|
|
|
|
protected QueryStringParameter (QueryStringParameter original) : base (original)
|
|
{
|
|
this.QueryStringField = original.QueryStringField;
|
|
|
|
}
|
|
|
|
public QueryStringParameter (string name, string queryStringField) : base (name)
|
|
{
|
|
QueryStringField = queryStringField;
|
|
}
|
|
|
|
public QueryStringParameter (string name, TypeCode type, string queryStringField) : base (name, type)
|
|
{
|
|
QueryStringField = queryStringField;
|
|
}
|
|
|
|
protected override Parameter Clone ()
|
|
{
|
|
return new QueryStringParameter (this);
|
|
}
|
|
|
|
protected override object Evaluate (Control control)
|
|
{
|
|
if (control == null || control.Page == null || control.Page.Request == null)
|
|
return null;
|
|
|
|
return control.Page.Request.QueryString [QueryStringField];
|
|
}
|
|
|
|
public string QueryStringField {
|
|
get {
|
|
string s = ViewState ["QueryStringField"] as string;
|
|
if (s != null)
|
|
return s;
|
|
|
|
return "";
|
|
}
|
|
set {
|
|
if (QueryStringField != value) {
|
|
ViewState ["QueryStringField"] = value;
|
|
OnParameterChanged ();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
#endif
|
|
|