Button Help in VS2005

bharanidharanit

Well-known member
Joined
Dec 8, 2008
Messages
53
Location
India
Programming Experience
1-3
Hello sir,
I am having 3 linklabels on the form and 1 button.
Consider these are the linklabels.
a
b
c

When "a" is clicked, button is visible on the form and when i click the button HTML output is displayed (i had already attached HTML pages to my project and also i know how to display output for HTML pages in the project) .

For a,b,c i am having different HTML pages.

What i actually need is?
I want to use only one button. But when i click a,b,c linklabels, the appropriate HTML output must be displayed.
 
Why the button? The linklabels would suffice, handle the LinkClicked event.
 
Why the button? The linklabels would suffice, handle the LinkClicked event.

No sir,
Actually when i click the linklabels it will display HTML page(Tutorial on HTML) in webbrowser control. But again if i want to try that tutorial only i click button. (To invoke Try it Editor)
There are many tutorials, I cant place so much buttons on the form for every linklables.
So if i press one linklabel means, the corresponding Try it editor must be invoked.
 
I see, so you store the "try it" name in button Tag when any linklabel is clicked, then when button is clicked you just look up the correct "try it" from your Tag info.
 
I see, so you store the "try it" name in button Tag when any linklabel is clicked, then when button is clicked you just look up the correct "try it" from your Tag info.
I am very beginner in VS2005, So i cant get you sir.
Can u explain me more detail (may be with some sample coding). So i may get it easier.
 
For one linklabel LinkClicked you do this:
VB.NET:
TryButton.Tag = "try1"
For another linklabel it could be "try2". You set any info you would need to identify the action you do when clicking the TryButton, for example:
VB.NET:
browser.Navigate(CStr(TryButton.Tag) & ".html")
this would navigate to "try1.html" after first linklabel was clicked and "try2.html" for second linklabel.
 
Back
Top