Kaynağa Gözat

Changed Page.ProcessPostData().
After the change ,the state of controls that aren't visible is saved
during a postback.

svn path=/trunk/mcs/; revision=28955

Alon Gazit 21 yıl önce
ebeveyn
işleme
476dc8a213

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

@@ -1,3 +1,8 @@
+2004-06-07  Alon Gazit <[email protected]>
+	* Page.cs: Changed Page.ProcessPostData().
+	After the change ,the state of controls that aren't visible is saved 
+	during a postback.
+	
 2004-06-07  Gonzalo Paniagua Javier <[email protected]>
 
 	* Page.cs: removed obsolete MonoTODO from RegisterOnSubmitStatement.

+ 21 - 10
mcs/class/System.Web/System.Web.UI/Page.cs

@@ -649,22 +649,33 @@ public class Page : TemplateControl, IHttpHandler
 				secondPostData.Add (real_id, data [id]);
 			}
 		}
-
+		ArrayList list1 = null;
 		if (_requiresPostBackCopy != null && _requiresPostBackCopy.Count > 0) {
 			string [] handlers = (string []) _requiresPostBackCopy.ToArray (typeof (string));
 			foreach (string id in handlers) {
 				IPostBackDataHandler pbdh = FindControl (id) as IPostBackDataHandler;
-				if (pbdh == null)
-					continue;
-			
-				_requiresPostBackCopy.Remove (id);
-				if (pbdh.LoadPostData (id, data)) {
-					if (requiresPostDataChanged == null)
-						requiresPostDataChanged = new ArrayList ();
-
-					requiresPostDataChanged.Add (pbdh);
+				if (pbdh != null)
+				{			
+					_requiresPostBackCopy.Remove (id);
+					if (pbdh.LoadPostData (id, data)) 
+					{
+						if (requiresPostDataChanged == null)
+							requiresPostDataChanged = new ArrayList ();
+	
+						requiresPostDataChanged.Add (pbdh);
+					}
+				}
+				else
+				{
+					if (second)
+					{
+						if (list1 == null)						
+							list1 = new ArrayList();						
+						list1.Add(id);
+					}
 				}
 			}
+			_requiresPostBack = list1;
 		}
 	}