[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 188
  • Last Modified:

Hyperlink in VB code

I want to add a hyperlink into my vb code, does anyone know how to do it?

here's my code
=========================================================
 LoginErrorDetails.Text = "Your password is incorrect. Please try again and remember that your password is case sensitive. Your account will be locked if you fail 5 login attempts. We recommend that you click on the Reset Password link after 4 unsucessful attempts."
===============================================
0
Ed
Asked:
Ed
  • 2
2 Solutions
 
ToFroCommented:
1. Add a LinkLabel control(myLinkLabel) to your form, set the url as its Text property
2. Handle the LinkLabel controls LinkClicked Event and use this code:
   
     myLinkLabel.LinkVisited = True
     System.Diagnostics.Process.Start(myLinkLabel.Text)


0
 
ToFroCommented:
Or in your case you could set the Text Property of the LinkLabel to "Reset Password" and simply
open the url you want like this:

     System.Diagnostics.Process.Start("http://www.mychangepasswordurl.com")

The Process.Start method is actually used to start a process, but using a url as the parameter will open the default web browser.
0

Featured Post

Transaction-level recovery for Oracle database

Veeam Explore for Oracle delivers low RTOs and RPOs with agentless transaction log backup and transaction-level recovery of Oracle databases. You can restore the database to a precise point in time, even to a specific transaction.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now