Question LinkLabel

shrona

Member
Joined
Apr 20, 2012
Messages
5
Programming Experience
Beginner
I am beginner in vb net.
I want to use LinkLabel in such a way that when user clicks on it then it should redirect user to other form.
How to do this?
Can this be done by using Button?
Is there any other control for this work?
 
A Button and a LinkLabel generally work in pretty much exactly the same way. They just look different. In both cases, the user clicks the control and an action is performed. In the case of a Button, you would handle the Click event and place the code you want executed in the event handler. In the case of a LinkLabel, you would handle the LinkClicked event. It doesn't really matter much to you because, either way, you're handling the default event so you simply double-click the control in the designer and the IDE will generate the event handler.

The main difference between the two controls, other than the appearance, is the fact that a LinkLabel can contain more then one link. That's why you handle LinkClicked instead of just Click: so you can distinguish between multiple links.
 
Back
Top