DaniWeb Programming
and Web Development Community
Loading
Home
Recent Posts
Revenue Sharing
Register
Contact Us
Login
Username
Password
Forgot your password?
|
Register
Welcome to TechnicalTalk.Net forum!
It seems that you are not a member yet. To interact with other members and to post on the forum.
Get a free account now
Earn money on this forum
Advertise with us...
TechnicalTalk
»
Programming and Web Development
»
.NET
»
Open a website in Internet Explorer using c#.net
Quick Links:
Want to earn money on forum? visit -->
Earn money on forum
Add to Reputation:
Reputation
What do you think of this post?
I agree
I disagree
Comment:
Pages: [
1
]
Go Down
Email this topic
|
Print
0 Members and 1 Guest are viewing this topic.
Open a website in Internet Explorer using c#.net
shefeekj
For Technical Information
Reputation Power: 1
New Coder
Posts: 26
Topics: 11
Open a website in Internet Explorer using c#.net
April 14, 2009, 06:26:38 AM
Here is the code in C#.net to open a website using internet explorer from a .net application.AN instance of internet explorer is created and the website is accessed using this instance
Note : Add reference to the DLL SHDocVw
Code:
using SHDocVw;
object o = null;
SHDocVw.InternetExplorer ie = new SHDocVw.InternetExplorerClass();
IWebBrowserApp wb = (IWebBrowserApp)ie;
wb.Visible = true;
wb.Navigate(url, ref o, ref o, ref o, ref o);
OpenBrowser(”http://www.google.com”);
«
Last Edit: April 14, 2009, 06:32:20 AM by polas
»
http://www.shefeekj.com
polas
Reputation Power: 17
Code Guru
Gender:
Posts: 1403
Topics: 86
Re: Open a website in Internet Explorer using c#.net
April 14, 2009, 06:58:53 AM
Nice post, what about if they use firefox?
Mesham Type Oriented Parallel Programming Language
,
Free online technical support
shefeekj
For Technical Information
Reputation Power: 1
New Coder
Posts: 26
Topics: 11
Re: Open a website in Internet Explorer using c#.net
April 14, 2009, 07:07:03 AM
This will launch the system defined default browser:
string url = "
http://stackoverflow.com/
";
System.Diagnostics.Process.Start(url);
http://www.shefeekj.com
polas
Reputation Power: 17
Code Guru
Gender:
Posts: 1403
Topics: 86
Re: Open a website in Internet Explorer using c#.net
April 14, 2009, 07:11:32 AM
Ah right thanks, the system defined browser makes sense
Mesham Type Oriented Parallel Programming Language
,
Free online technical support
singam
Reputation Power: 2
Regular Coder
Posts: 50
Topics: 19
Re: Open a website in Internet Explorer using c#.net
June 19, 2010, 12:36:17 AM
/// <summary>
/// Opens a new Internet Explorer window and navigates it to the URL.
/// This code is for demonstration purposes only.
/// </summary>
/// <param name="sURL">URL to navigate to. </param>
/// <returns>true all the time. </returns>
public static bool IEOpenOnURL (string sURL)
{
InternetExplorer oIE = (InternetExplorer)NSLibStatic. COMCreateObject
("InternetExplorer. Application");
if (oIE != null)
{
object oEmpty = String. Empty;
object oURL= sURL;
oIE. Visible = true;
oIE. Navigate2 (ref oURL, ref oEmpty, ref oEmpty, ref oEmpty, ref oEmpty);
}
return true;
}
==============
Search Engine Optimisation UK | Link Building
Andrew26
Reputation Power: 1
New Coder
Gender:
Age: 26
Posts: 15
Topics: 0
Re: Open a website in Internet Explorer using c#.net
January 28, 2012, 04:39:37 AM
Nice post . . thanks :)
Wholesale Sunglasses
Ricky26
Reputation Power: 1
New Coder
Posts: 15
Topics: 0
Re: Open a website in Internet Explorer using c#.net
January 30, 2012, 05:19:26 AM
Great post, what about if they use Google chrome?
eGo-C
Email this topic
|
Print
Pages: [
1
]
Go Up
Jump to:
Please select a destination:
-----------------------------
Technical Resources - Articles and Videos
-----------------------------
=> Read/Post Free Articles
===> SEO and Marketing
===> Graphics and Design
===> Operating Systems
===> Programming
===> Gadget and Product Review
=> Video Tutorials
-----------------------------
Programming and Web Development
-----------------------------
=> C/C++
=> Visual Basic 6.0
=> Classic ASP 3.0
=> .NET
=> PHP
=> JAVA
=> Python
=> JavaScript and VBScript - Scripting Languages
=> Web Security
=> Other programming languages
=> Database Programming Discussions
===> Microsoft SQL Server
===> My SQL
-----------------------------
Graphics and Web Design
-----------------------------
=> HTML/XHTML/DHTML & CSS
=> Photoshop and Flash
=> General Web Design
=> Review your website or blog
-----------------------------
Operating Systems
-----------------------------
=> Windows
=> Linux and Unix
=> General - Operating System Discussion
-----------------------------
SEO and Marketing Success Strategy
-----------------------------
=> Search Engines
===> Google
===> Yahoo
===> Microsoft Bing
=> SEO - Search Engine Optimization
===> Web Directories
===> Link Development
=> Internet Marketing and Advertising
===> Affiliate Programs
===> Generating Revenue
===> Increasing Traffic
=> General Marketing Discussion
=> Promote Your Service
-----------------------------
Web Hosting and Hosting Management
-----------------------------
=> Web Hosting Talk
=> Web Hosting offers and plans
-----------------------------
Miscellaneous
-----------------------------
=> Blogging - Blogger's Paradise
=> Social Networks
=> Tips and Tricks
=> Chit Chat - Non Programming
-----------------------------
Forum Information
-----------------------------
=> Introduce Yourself
=> Suggestions and Feedback
=> Forum Rules/Guidelines/News/Announcements
=> Forum Support
=> Forum Games and Contests
===> Games
Home
|
Advertise
|
Forum Help
|
Privacy Policy
|
Contact us
Powered by SMF 1.1.16
|
SMF © 2011, Simple Machines
Google visited last this page May 09, 2012, 02:41:04 PM
Loading...