working with ASP:HYPERLINK

N

nicknack

Hello.
I have an asp:hyperling in my page and I'm trying to make it "clicked"
from my code behind.
Is this possible?
I also tried it with JS but its look like the hyperlink doesn't have a
"click()" method :(

Any body have an idea?


Thanks in advance,

Roy.
 
O

Onwuka Emeka

if you are trying with javascript, it is possible by pointing the
NavigateUrl of the Hyperlink to a javascript function viz

function sayHello()
{
alert('Hello Now');
}

<asp:HyperLink NavigateUrl="javascript:sayHello();" runat=server
id=hyperlink1></asp:HyperLink>

or you use an asp:LinkButton its a hyperlink with postback functionality :).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,431
Messages
2,571,679
Members
48,796
Latest member
Greg L.

Latest Threads

Top