473,382 Members | 1,611 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

working with ASP:HYPERLINK

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.

Nov 2 '06 #1
2 1239
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 :).
"nicknack" <ro******@gmail.comwrote in message
news:11**********************@h48g2000cwc.googlegr oups.com...
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.

Nov 2 '06 #2
thanks. i'll will check that out :)
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 :).
"nicknack" <ro******@gmail.comwrote in message
news:11**********************@h48g2000cwc.googlegr oups.com...
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.
Nov 2 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Thubaiti | last post by:
Hi, I have this code: <td> <a href="#" class="toolbar">Computers</a> <a href="commun.html" class="toolbar">Communications</a> <a href="electronics.html" class="toolbar">Electronics</a> <a...
4
by: Amir Eshterayeh | last post by:
Dear Friends My asp hyperlink goes to relative address instead of absolute. I like navigate url goes to outsite link like www.asp.net but now, it goes to www.mysite/www.asp.net please help....
3
by: Aaron | last post by:
How do I do this? <asp:hyperlink style="Z-INDEX: 144; LEFT: 4px; POSITION: absolute; TOP: 119px" runat="server" Text="Click Me!" NavigateUrl="mailto://<% response.write(txtBEmail.Text.ToString)...
4
by: James P. | last post by:
Hello there, I have an asp hyperlink in a template page. In my user control page - code behind page that uses the template, I'd like to turn this link invisible in certain case. Is it...
5
by: Martin Dew | last post by:
Having some problems getting a hyperlink object to work in my repeater control, It displays the text I have asked it to for the hyperlink, but it does not act as a link. My repeater code is below...
3
by: MrMike | last post by:
I have the following hyperlink webcontrol. The problem is that I can't figure out how to pass the webform's Request.Querystring("id") param into the NavigateURL as shown below. As it is currently...
9
by: Leon | last post by:
What Am I Doing Wrong? Code Will Not Run, I Can't See The Error! Thanks. <asp:datalist id="DataList1" runat="server" RepeatColumns="4"> <ItemTemplate> <asp:HyperLink id=HyperLink1 ImageUrl=...
9
by: dana lees | last post by:
Hello, I am using asp:HyperLink in a c# asp.net application to open a new window in the following way: <asp:HyperLink ID="lnkSiteName" runat="server" Text='<%# DataBinder.Eval(Container,...
7
by: ashtek | last post by:
I have an <ASP:HYPERLINKon a datagrid (templatecolumn) and I need to open a new window with no toolbar and specific height & width onclick of the link. I also want to pass the PK to this new...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.