how to add theme for a web page when it's calling form windows application using Web Request class

Feb 25 2008 6:21 PM

Hi Everybody,

I want to apply theme for a web page when it's calling from windows application using web Request class.

Here is the code in windows application

public static string GetPageHTML(string url)

{

string strHtml = String.Empty;

try

{

Uri uri = new Uri(url);

WebRequest resq = WebRequest.CreateDefault(uri);

WebResponse resp = null;

StreamReader sr;

resq.Timeout = 99999999;

resq.Credentials = CredentialCache.DefaultNetworkCredentials;

resq.PreAuthenticate = false;

resp = resq.GetResponse();

sr = new StreamReader(resp.GetResponseStream());

strHtml = sr.ReadToEnd();

}

catch (Exception ex)

{

strHtml = string.Empty;

//throw ex;

}

return strHtml;

}

}

On the Web Application relavent page I override the PreInit Event  with the Masterpage information and Theme .I get the content with out applying Theme.(Master page and Theme infomation are stored in DB).Please help me .

 

thank you

Sam