+2006-08-09 Robert Jordan <robertj@gmx.net>
+
+ * Control.cs: add the 2.0 ResolveClientUrl method.
+ Expose ResolveClientUrl as internal for the 1.1 profile.
+ Fixes bug #77539.
+
2006-08-08 Vladimir Krasnov <vladimirk@mainsoft.com>
* added MasterPageParser.jvm.cs
HttpResponse resp = Context.Response;
return resp.ApplyAppPathModifier (UrlUtils.Combine (ts, relativeUrl));
}
+
+
+#if NET_2_0
+ public
+#else
+ internal
+#endif
+ string ResolveClientUrl (string relativeUrl)
+ {
+ if (relativeUrl == null)
+ throw new ArgumentNullException ("relativeUrl");
+
+ if (relativeUrl == "")
+ return "";
+
+ if (relativeUrl [0] == '#')
+ return relativeUrl;
+
+ string ts = TemplateSourceDirectory;
+ if (ts == "" || !UrlUtils.IsRelativeUrl (relativeUrl))
+ return relativeUrl;
+
+ HttpResponse resp = Context.Response;
+ string absoluteUrl = resp.ApplyAppPathModifier (UrlUtils.Combine (ts, relativeUrl));
+ if (absoluteUrl.StartsWith (ts + "/"))
+ return absoluteUrl.Substring (ts.Length + 1);
+ return absoluteUrl;
+ }
internal bool HasRenderMethodDelegate () {
return _renderMethodDelegate != null;
get { return skinId; }
set { skinId = value; }
}
-
- public string ResolveClientUrl (string url)
- {
- throw new NotImplementedException ();
- }
ControlBuilder IControlBuilderAccessor.ControlBuilder {
get {throw new NotImplementedException (); }