Hi,
Why don't you try putting the absolute URL for Back_Markel.png
instead of a Relative URL.
As you are loading a String and not a URL, the Base URL of the
Page will be different.
Best Regards,
Sridharan Srinivasan
Alias Sri.
On Wed, May 2, 2012 at 6:03 AM, Paul Johnson
<[email protected]> wrote:
> Hi,
>
> My app currently sucks in information from a webservice, adds a stylesheet
> from assets and them pops it out to a webbrowser. Simple enough, but
> something isn't right and I'm wondering it I'm doing it right.
>
> Currently, the code looks like this
>
> public void getOvernights(Context c, Action<string> callback)
> {
> string retStr = "";
> if (checkForNetwork() != true)
> {
> callback(NETFAULT);
> }
> else
> {
> try
> {
> POHWS.webservice.Service1 Service4 = new
> POHWS.webservice.Service1();
> Service4.BeginGetOvernights(delegate(IAsyncResult iar1)
> {
> string spon = Service4.EndGetOvernights(iar1);
>
> Android.App.Application.SynchronizationContext.Post(delegate
> {
> string uri = "StyleSheet.css";
> string settings = string.Empty;
> var input = c.Assets.Open(uri);
> using (StreamReader sr = new
> System.IO.StreamReader(input))
> {
> settings = sr.ReadToEnd();
> }
> string CSS = "<html><head><style>" + settings +
> "</style></head><body style=\"background:
> url(Back_Markel.png);Height:1000px\">";
> retStr = CSS + spon + "</body></html>";
> #if DEBUG
> Console.WriteLine(retStr);
> #endif
> callback(retStr);
> }, null);
> }, null);
> }
> catch (Exception oe)
> {
> callback(oe.ToString());
> }
> }
> }
>
> There are two problems. Standard HTML isn't written like this. On the web
> browser, there is nothing - the webservice works, but the foreground and
> background are white and it's not pulling in Back_Markel.png from assets.
>
> Any clues as to why things are not playing ball here?
>
> Paul
> _______________________________________________
> Monodroid mailing list
> [email protected]
>
> UNSUBSCRIBE INFORMATION:
> http://lists.ximian.com/mailman/listinfo/monodroid
--
Sridharan Srinivasan
Alias Sri
Ph:(65)98255785/(65)63922439
www.arshu.com
_______________________________________________
Monodroid mailing list
[email protected]
UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid