[Mono-list] '$' in __dopostback script

Hubert FONGARNAND hubertf-1@altern.org
Mon, 14 Feb 2005 10:13:24 +0100


--Boundary-00=_0uGEC1A5/kx1wFf
Content-Type: text/plain;
  charset="us-ascii"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Last week, i've talked about compatibility problems in __dopostback script.
In fact ms.net call __dopostback script with '$' in the name of the component, 
mono call call __dopostback script with ':'
Here's the patch that fix this problem, so you can now call __dopostback with 
'$' or ':', it doesn't matter anymore...

Hubert FONGARNAND

-- 
Hubert FONGARNAND
Fiducial IT
_______________________________________________
Ce message et les éventuels documents joints peuvent contenir des informations confidentielles.
Au cas où il ne vous serait pas destiné, nous vous remercions de bien vouloir le supprimer et en aviser immédiatement l'expéditeur. Toute utilisation de ce message non conforme à sa destination, toute diffusion ou publication, totale ou partielle et quel qu'en soit le moyen est formellement interdite.
Les communications sur internet n'étant pas sécurisées, l'intégrité de ce message n'est pas assurée et la société émettrice ne peut être tenue pour responsable de son contenu.

--Boundary-00=_0uGEC1A5/kx1wFf
Content-Type: text/x-diff;
  charset="us-ascii";
  name="patch_postback"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
	filename="patch_postback"

Index: class/System.Web/System.Web.UI/ChangeLog
===================================================================
--- class/System.Web/System.Web.UI/ChangeLog	(revision 40487)
+++ class/System.Web/System.Web.UI/ChangeLog	(working copy)
@@ -1,3 +1,8 @@
+2005-02-14  Hubert Fongarnand <informatique.internet@fiducial.fr>
+
+	* Page.cs: __do_postback script now support names with '$' instead of
+	':'
+
 2005-02-10  Lluis Sanchez Gual <lluis@novell.com>
 
 	* Page.cs: Added support for validation groups. Some fixes in
Index: class/System.Web/System.Web.UI/Page.cs
===================================================================
--- class/System.Web/System.Web.UI/Page.cs	(revision 40487)
+++ class/System.Web/System.Web.UI/Page.cs	(working copy)
@@ -666,7 +666,7 @@
 			writer.WriteLine ("\tvar theForm = document.getElementById ('{0}');", formUniqueID);
 
 		writer.WriteLine ("\tfunction __doPostBack(eventTarget, eventArgument) {");
-		writer.WriteLine ("\t\ttheForm.{0}.value = eventTarget;", postEventSourceID);
+		writer.WriteLine ("\t\ttheForm.{0}.value = eventTarget.replace('$',':');", postEventSourceID);
 		writer.WriteLine ("\t\ttheForm.{0}.value = eventArgument;", postEventArgumentID);
 		writer.WriteLine ("\t\ttheForm.submit();");
 		writer.WriteLine ("\t}");

--Boundary-00=_0uGEC1A5/kx1wFf--