Browse Source

2005-09-20 Gonzalo Paniagua Javier <[email protected]>

	* TraceData.cs: we have to change the method of getting a control render
	size. MS does not do this or otherwise would run into the same bug
	(#76051) that this patch fixes. This is temporarily setting the size
	to 0.


svn path=/trunk/mcs/; revision=50344
Gonzalo Paniagua Javier 20 years ago
parent
commit
6a366a0c37

+ 7 - 0
mcs/class/System.Web/System.Web/ChangeLog

@@ -1,3 +1,10 @@
+2005-09-20 Gonzalo Paniagua Javier <[email protected]>
+
+	* TraceData.cs: we have to change the method of getting a control render
+	size. MS does not do this or otherwise would run into the same bug
+	(#76051) that this patch fixes. This is temporarily setting the size
+	to 0.
+
 2005-09-20 Gonzalo Paniagua Javier <[email protected]>
 
 	* HttpResponseStream.cs: implemented Send(stream) for files. Fixes bug

+ 1 - 10
mcs/class/System.Web/System.Web/TraceData.cs

@@ -177,7 +177,7 @@ namespace System.Web {
 			r ["ControlId"] = c.UniqueID;
 			r ["Type"] = c.GetType ();
 			r ["Depth"] = control_pos;
-			r ["RenderSize"] = GetRenderSize (c);
+			r ["RenderSize"] = 0;
 			r ["ViewstateSize"] = GetViewStateSize (c, (ctrl_vs != null) ? ctrl_vs [c] : null);
 
 			control_data.Rows.Add (r);
@@ -188,15 +188,6 @@ namespace System.Web {
 			}
 		}
 
-		static int GetRenderSize (Control c)
-		{
-			StringWriter sr = new StringWriter ();
-			HtmlTextWriter output = new HtmlTextWriter (sr);
-			c.RenderControl (output);
-			output.Flush ();
-			return sr.GetStringBuilder ().Length;
-		}
-
 		static int GetViewStateSize (Control ctrl, object vs)
 		{
 			if (vs == null)