The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.
|
 |
|
Dev Shed Forums
> Programming Languages - More
> .Net Development
|
C#: Open webpage in browser from windows control
Discuss C#: Open webpage in browser from windows control in the .Net Development forum on Dev Shed. C#: Open webpage in browser from windows control .NET development forum discussing all .NET derivatives including C#, VB.NET, ASP.NET, ADO.NET and more. Learn the ins and outs of using the .NET framework.
|
|
 |
|
|
|
|

Dev Shed Forums Sponsor:
|
|
|

January 11th, 2006, 06:29 AM
|
 |
Contributing User
|
|
|
|
|
C#: Open webpage in browser from windows control
Hi,
I have seen many articles explaining how to open a webpage via an ASP.NET web control but I need to know how to open a webpage from a Windows Form Control.
Does anyone know what control class or command is used to do this?
Thanks!
|

January 11th, 2006, 08:45 AM
|
 |
I <3 ASCII
|
|
|
|
Most that I've seen, would just launch the system command "iexplore <website>" It won't open the website in the browser of choice, but why would anything use anything other than IE?
-MBirchmeier
|

January 11th, 2006, 10:27 AM
|
 |
Contributing User
|
|
|
|
|
And how do you do that? I cant see iexplore anywhere.
|

January 11th, 2006, 10:43 AM
|
 |
I <3 ASCII
|
|
|
|
You should be able to do
Code:
System.Diagnostics.Process proc = new System.Diagnostics.Process();
proc.StartInfo.Application = "iexplore";
proc.StartInfo.Arguments = "www.google.com";
proc.Start();
-MBirchmeier
<note> untested, i'm running CompactFramework currently which doesn't allow for System.Diagnostics and i'm too lazy to load up full framework currently.
Last edited by MBirchmeier : January 11th, 2006 at 10:46 AM.
|

January 11th, 2006, 10:53 AM
|
 |
Contributing User
|
|
|
|
|
Apparently there is no such object "Application" under proc.StartInfo
|

January 11th, 2006, 10:58 AM
|
 |
I <3 ASCII
|
|
|
|
Quote: | Originally Posted by Cep Apparently there is no such object "Application" under proc.StartInfo |
Then google it it's been almost a year since i've worked in full framework, ya gotta do your own research sometimes.
|

January 13th, 2006, 05:40 AM
|
 |
Contributing User
|
|
|
|
I have thats the problem  everything else always refers to using the asp.net code for a web form not a windows form.
|

January 13th, 2006, 09:06 AM
|
 |
I <3 ASCII
|
|
|
|
|

October 23rd, 2007, 05:59 AM
|
|
Registered User
|
|
Join Date: Oct 2007
Posts: 1
Time spent in forums: 5 m 19 sec
Reputation Power: 0
|
|
don't u mean
proc.StartInfo.FileName ="iexplore"
|
Developer Shed Advertisers and Affiliates
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Rate This Thread |
Linear Mode
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|