Browse Source

2007-08-23 Igor Zelmanovich <[email protected]>

	* Panel.cs: client script consider MultiForm environment.

svn path=/trunk/mcs/; revision=84693
Igor Zelmanovich 18 years ago
parent
commit
25001d5cdb

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

@@ -1,3 +1,7 @@
+2007-08-23 Igor Zelmanovich <[email protected]>
+
+	* Panel.cs: client script consider MultiForm environment.
+
 2007-08-21  Marek Habersack  <[email protected]>
 
 	* ObjectDataSourceView.cs: get rid of PrivateBinPath property,

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

@@ -68,7 +68,7 @@ namespace System.Web.UI.WebControls {
 					throw new InvalidOperationException (String.Format ("The DefaultButton of '{0}' must be the ID of a control of type IButtonControl.", ID));
 
 				Page.ClientScript.RegisterWebFormClientScript ();
-				w.AddAttribute ("onkeypress", String.Format ("javascript:return WebForm_FireDefaultButton(event, '{0}')", button.ClientID));
+				w.AddAttribute ("onkeypress", String.Format ("javascript:return {1}WebForm_FireDefaultButton(event, '{0}')", button.ClientID, Page.IsMultiForm ? Page.theForm + "." : null));
 			}
 
 			if (Direction != ContentDirection.NotSet) {