Link to home
Create AccountLog in
Avatar of YRKS
YRKS

asked on

Creating hyperlink in asp.net + vb.net

I need to create a link on a page <a href=>Display Name</a>

when I click on the above link all the names have to be displayed and the original i\ link   now vanishes from the page and it displays <a href=>Display active Names</a>

I thought this would be easy. But when I started coding it. Got confused.
YRKS
Avatar of samtran0331
samtran0331
Flag of United States of America image

did you use an asp:hyperlink or a asp:linkbutton control?
can you post code?
which approach do u use?
asp:Hyperlink ?

or

<a href=<%=myLink%>>Display Name</a>

code behind:
public string myLink="http://www.yahoo.com";
Avatar of Pratima
you need to write like this

<a href="url here">Display Name</a>
Avatar of YRKS
YRKS

ASKER

I tried using <asp: hyperlink> and <a href="url  here">Display name

Now Display name has to change as I have to display this the first time I come on the page
<a href="url1">DName1</a>
And if the user clicks this link I do the corresponding data and another string has to be displayed.
<a href="url2">DName2</a>
the a href tag will redirect you to the the url that you have specified ..........

did you want to o any server side cding on the buttone click..........

if yes then then you need to use<Asp:Linkbutton >
ASKER CERTIFIED SOLUTION
Avatar of Pratima
Pratima
Flag of India image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
Avatar of YRKS

ASKER

Thanks Pratima, I have another question which I will ask separately.
Avatar of YRKS

ASKER

Thanks everybody else to