Click here to Skip to main content
11,930,231 members (42,997 online)
Rate this:
Please Sign up or sign in to vote.
See more: C# C#4.0
In a button event how do i redirect it to website when the button get clicks in windows application?
Posted 12-Jun-13 2:38am
What's the problem? Redirect what? It depends on what you are using. System.Windows.Forms.WebBrowser? System.Windows.Controls.WebBrowser? Something else? It is of course possible (if I understand your question), but what's the problem?
Rate this: bad
Please Sign up or sign in to vote.

Solution 1


Put that in the button click event. That will open your default web browser to the website, thats the only kind of "redirect" I know of from a windows forms application.
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

string strUrl = "";
Process proc = new Process();
ProcessStartInfo startInfo = new ProcessStartInfo(strUrl);
proc.StartInfo = startInfo;

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.151126.1 | Last Updated 12 Jun 2013
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100