C# how to link button on Windows form to a website

Posted on 2005-05-02
Last Modified: 2010-04-17
I have a PUSHBUTTON on my Windows app which I want to bring the clicker to a website.
How do I code the click event handler or set some property at design time to do that?

Question by:rj94070
    LVL 2

    Assisted Solution

    private void button1_Click(object sender, System.EventArgs e)
          System.Diagnostics.Process p = new System.Diagnostics.Process();
                    p.StartInfo.FileName = "";
          p.StartInfo.UseShellExecute = true;
    LVL 48

    Accepted Solution

    Did you try LinkLabel control available in Windows Forms toolbox?

    If you want to do this using button, use Process.Start Method (ProcessStartInfo) in the button handler. Set ProcessStartInfo.UseShellExecute Property to true and ProcessStartInfo.FileName to required URL.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Here we come across an interesting topic of coding guidelines while designing automation test scripts. The scope of this article will not be limited to QTP but to an overall extent of using VB Scripting for automation projects. Introduction Now…
    If you’re thinking to yourself “That description sounds a lot like two people doing the work that one could accomplish,” you’re not alone.
    Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
    In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now