Browse Source

2004-06-05 Gonzalo Paniagua Javier <[email protected]>

	* Page.cs: IsPostBack also returns true when method is GET and we have
	viewstate information in the query string. Fixes bug #58151.

svn path=/trunk/mcs/; revision=28876
Gonzalo Paniagua Javier 21 years ago
parent
commit
07f363f435

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

@@ -1,3 +1,8 @@
+2004-06-05  Gonzalo Paniagua Javier <[email protected]>
+
+	* Page.cs: IsPostBack also returns true when method is GET and we have
+	viewstate information in the query string. Fixes bug #58151.
+
 2004-06-05  Gonzalo Paniagua Javier <[email protected]>
 
 	* Page.cs: removed obsolete TODO. Only check if Trace is enabled, not

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

@@ -192,7 +192,7 @@ public class Page : TemplateControl, IHttpHandler
 	public bool IsPostBack
 	{
 		get {
-			return (0 == String.Compare (Request.HttpMethod, "POST", true));
+			return _requestValueCollection != null;
 		}
 	}
 
@@ -367,7 +367,7 @@ public class Page : TemplateControl, IHttpHandler
 			return null;
 
 		NameValueCollection coll = null;
-		if (IsPostBack)
+		if (0 == String.Compare (Request.HttpMethod, "POST", true))
 			coll =	req.Form;
 		else 
 			coll = req.QueryString;