Groups | Blog | Home
all groups > dotnet compact framework > june 2006 >

dotnet compact framework : PAD Information in web request


Agustin
6/14/2006 6:22:37 PM
Hi. I'm developing some kind of web browser. Im wraping the htmlview.dll
only for rendering html. All concerning web download I'm using a
WebRequest. One thing I saw is that when I use the htmlview.dll for
navigate, for example to google's page, the web request maybe has some
extra information because download de pda google page. But when I
request google page using de WebRequest I think I'm obtaining the normal
desktop google's page, because when I try to render it, using my wraper,
it get stock and don't render at all.

request = WebRequest.Create("htpp://www.google.com");
.... Obtain the string content and then..
myRender.AddText(content) (Wraps SendMessage(_hwnd, DTM_ADDTEXTW, 0, txt);)
myRender.EndOfSorurce(); (Wraps SendMessage(_hwnd, DTM_ENDOFSOURCE, 0, 0);)

The way that I implement the wraper is based on this example

http://www.gotdotnet.com/Community/UserSamples/Details.aspx?SampleGuid=baf7ab21-4037-4a0f-9b39-e3914000e9cc
pwrausitn
7/18/2006 12:18:26 AM
You have to set the UserAgent property of the WebRequets object with
the one that you want. For example "Mozilla/4.0 (compatible; MSIE 4.01;
Windows CE; 240x320)", I try that one and it works with your example, I
point to www.google.com and it redirects to www.google.com/pda
In this page you have lots of string examples

http://www.cantoni.org/2005/02/03/mobile-ua

Hope it helps

Agustin escribió:
[quoted text, click to view]
AddThis Social Bookmark Button