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
Monodroid@lists.ximian.com
UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid