0

I have made a web browser in C#, but i want an option like use as a mobile browser, like which contents of websites will load as mobile browser like if at that moment user browses www.facebook.com it will automatically go to m.facebook.com such as our mobile phone browsers does.

I can make this by replacing www to m by String Changing but some other sites like blogspot sites has two different views for mobile and web in one domain of {myblog}.blogspot.com

So for these cases, is it possible to load contents as mobile browser in my winform web browser {im using C#}

EDIT: I meant something like User Agent

DG_
  • 246
  • 1
  • 3
  • 15
  • Have you looked at [this question](http://stackoverflow.com/questions/1005153/auto-detect-mobile-browser-via-user-agent)? – Ladi Sep 20 '15 at 07:32
  • yeah, i dont want to detect mobile browser, because user will use this windows app, but contents will load as mobile page. my app is not a mobile application – DG_ Sep 20 '15 at 07:34

1 Answers1

0

Try this :

webBrowser.Navigate("http://localhost/run.php", null, null,
                string.Format("User-Agent: {0}", "Opera/9.80 (J2ME/MIDP; Opera Mini/9 (Compatible; MSIE:9.0; iPhone; BlackBerry9700; AppleWebKit/24.746; U; en) Presto/2.5.25 Version/10.54"));
fahimalizain
  • 844
  • 8
  • 15