add Http callback support for J2EE portlets.
[mono.git] / mcs / class / System.Web / System.Web.UI.WebControls / ImageButton.cs
index 79e2d4bf1b0cd9f5ea02614ef325c160c5b258a9..5596f835322de246833071dab343422e6f066673 100644 (file)
@@ -218,8 +218,7 @@ namespace System.Web.UI.WebControls {
                        }
 
                        if (Page != null) {
-                               PostBackOptions options = GetPostBackOptions ();
-                               onclick += Page.ClientScript.GetPostBackEventReference (options, true);
+                               onclick += GetClientScriptEventReference ();
                        }
 
                        if (onclick.Length > 0)
@@ -235,15 +234,16 @@ namespace System.Web.UI.WebControls {
                }
 
 #if NET_2_0
+               internal virtual string GetClientScriptEventReference ()
+               {
+                       PostBackOptions options = GetPostBackOptions ();
+                       return Page.ClientScript.GetPostBackEventReference (options, true);
+               }
+
                protected virtual PostBackOptions GetPostBackOptions ()
                {
                        PostBackOptions options = new PostBackOptions (this);
                        options.ActionUrl = (PostBackUrl.Length > 0 ? Page.ResolveClientUrl (PostBackUrl) : null);
-#if TARGET_J2EE
-                       vmw.@internal.j2ee.IPortletRenderResponse resp = GetRenderResponse();
-                       if (resp != null && options.ActionUrl != null)
-                               options.ActionUrl = resp.createActionURL(options.ActionUrl);
-#endif
                        options.ValidationGroup = null;
                        options.Argument = "";
                        options.ClientSubmit = false;