浏览代码

2004-10-25 Gonzalo Paniagua Javier <[email protected]>

	* ListItemCollection.cs: fixed bug when indexing changed elements in
	LoadViewState. Patch from Alois B��la��ka.

svn path=/trunk/mcs/; revision=35297
Gonzalo Paniagua Javier 21 年之前
父节点
当前提交
64aa018dbf

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

@@ -1,3 +1,8 @@
+2004-10-25 Gonzalo Paniagua Javier <[email protected]>
+
+	* ListItemCollection.cs: fixed bug when indexing changed elements in
+	LoadViewState. Patch from Alois Bělaška.
+
 2004-10-20 Sanjay Gupta <[email protected]>
 	
 	* SiteMapDataSourceView.cs: 

+ 1 - 1
mcs/class/System.Web/System.Web.UI.WebControls/ListItemCollection.cs

@@ -272,7 +272,7 @@ namespace System.Web.UI.WebControls
 				end = indices.Count;
 				for (i = 0; i < end; i++) {
 					if ((int) indices [i] < Count ) {
-						this [i].LoadViewState (states [i]);
+						this [(int) indices [i]].LoadViewState (states [i]);
 					} else {
 						ListItem temp = new ListItem ();
 						temp.LoadViewState (states [i]);