Browse Source

2010-03-30 Gonzalo Paniagua Javier <[email protected]>

	* System.Web.UI/PageParser.cs:
	* System.Web.UI/Page.cs:
	* System.Web.Compilation/PageCompiler.cs: default for
	EnableViewStateMac is true. Allow setting it from a @Page
	directive.


svn path=/trunk/mcs/; revision=154493
Gonzalo Paniagua Javier 16 years ago
parent
commit
4ac0c2f561

+ 11 - 1
mcs/class/System.Web/System.Web.Compilation/ChangeLog

@@ -1,6 +1,16 @@
+2010-03-30 Gonzalo Paniagua Javier <[email protected]>
+
+	* PageCompiler.cs: default for EnableViewStateMac is true. Allow
+	setting it from a @Page directive.
+
 2010-03-17  Marek Habersack  <[email protected]>
 
-	* AspGenerator.cs, AspParser.cs, TemplateControlCompiler.cs, TagType.cs, CodeRenderBuilder.cs: implemented the new <%: %> 4.0 html-encoded code render expression.
+	* AspGenerator.cs
+	* AspParser.cs:
+	* TemplateControlCompiler.cs:
+	* TagType.cs
+	* CodeRenderBuilder.cs: implemented the new <%: %> 4.0 html-encoded
+	code render expression.
 
 2010-03-06  Marek Habersack  <[email protected]>
 

+ 8 - 0
mcs/class/System.Web/System.Web.Compilation/PageCompiler.cs

@@ -354,6 +354,14 @@ namespace System.Web.Compilation
 				expr.Method = new CodeMethodReferenceExpression (prop, "ValidateInput");
 				method.Statements.Add (expr);
 			}
+
+			if (!pageParser.EnableViewStateMac) {
+				CodeAssignStatement stmt = new CodeAssignStatement ();
+				stmt.Left = new CodePropertyReferenceExpression (thisRef, "EnableViewStateMac");
+				stmt.Right = new CodePrimitiveExpression (false);
+				method.Statements.Add (stmt);
+			}
+
 		}
 
 		CodeAssignStatement AssignOutputCacheParameter (CodeVariableReferenceExpression variable, string propName, object value)

+ 6 - 0
mcs/class/System.Web/System.Web.UI/ChangeLog

@@ -1,3 +1,9 @@
+2010-03-30 Gonzalo Paniagua Javier <[email protected]>
+
+	* PageParser.cs:
+	* Page.cs: default for EnableViewStateMac is true. Allow setting it
+	from a @Page directive.
+
 2010-01-20  Marek Habersack  <[email protected]>
 
 	* ObjectStateFormatter.cs: implemented support for IndexedString

+ 1 - 1
mcs/class/System.Web/System.Web.UI/Page.cs

@@ -73,7 +73,7 @@ public partial class Page : TemplateControl, IHttpHandler
 	string _focusedControlID;
 	bool _hasEnabledControlArray;
 	bool _viewState;
-	bool _viewStateMac;
+	bool _viewStateMac = true;
 	string _errorPage;
 	bool is_validated;
 	bool _smartNavigation;

+ 2 - 3
mcs/class/System.Web/System.Web.UI/PageParser.cs

@@ -335,9 +335,8 @@ namespace System.Web.UI
 			enable_event_validation = GetBool (atts, "EnableEventValidation", enable_event_validation);
 			maintainScrollPositionOnPostBack = GetBool (atts, "MaintainScrollPositionOnPostBack", maintainScrollPositionOnPostBack);
 
-			// Ignored by now
-			GetString (atts, "EnableViewStateMac", null);
-			GetString (atts, "SmartNavigation", null);
+			enableViewStateMac = GetBool (atts, "EnableViewStateMac", enableViewStateMac);
+			smartNavigation = GetBool (atts, "SmartNavigation", smartNavigation);
 
 			base.ProcessMainAttributes (atts);
 		}