// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-using System.Web;
-using System.Web.UI.WebControls;
using System.Globalization;
using System.ComponentModel;
+using System.Security.Permissions;
-namespace System.Web.UI.WebControls
-{
+namespace System.Web.UI.WebControls {
+ // CAS
+ [AspNetHostingPermission (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
+ [AspNetHostingPermission (SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
+ // attributes
#if NET_2_0
[ToolboxData("<{0}:CompareValidator runat=\"server\" ErrorMessage=\"CompareValidator\"></{0}:CompareValidator>")]
#else
return base.ControlPropertiesValid();
/* attempt to locate the ControlToCompare somewhere on the page */
- Control control = Page.FindControl (ControlToCompare);
+ Control control = NamingContainer.FindControl (ControlToCompare);
if (control == null)
throw new HttpException (String.Format ("Unable to locate ControlToCompare with id `{0}'", ControlToCompare));
[Themeable (false)]
#endif
public string ControlToCompare {
- get {
- return ViewState.GetString ("ControlToCompare", String.Empty);
- }
- set {
- ViewState["ControlToCompare"] = value;
- }
+ get { return ViewState.GetString ("ControlToCompare", String.Empty); }
+ set { ViewState["ControlToCompare"] = value; }
}
[DefaultValue(ValidationCompareOperator.Equal)]
[Themeable (false)]
#endif
public ValidationCompareOperator Operator {
- get {
- return (ValidationCompareOperator)ViewState.GetInt ("Operator", (int)ValidationCompareOperator.Equal);
- }
-
- set {
- ViewState ["Operator"] = (int)value;
- }
+ get { return (ValidationCompareOperator)ViewState.GetInt ("Operator", (int)ValidationCompareOperator.Equal); }
+ set { ViewState ["Operator"] = (int)value; }
}
#if !NET_2_0
[Themeable (false)]
#endif
public string ValueToCompare {
- get {
- return ViewState.GetString ("ValueToCompare", String.Empty);
- }
- set {
- ViewState ["ValueToCompare"] = value;
- }
+ get { return ViewState.GetString ("ValueToCompare", String.Empty); }
+ set { ViewState ["ValueToCompare"] = value; }
}
}
}