473,772 Members | 2,349 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1251
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:HyperLin k NavigateUrl="ja vascript:sayHel lo();" 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.goo glegroups.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:HyperLin k NavigateUrl="ja vascript:sayHel lo();" 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.goo glegroups.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
3186
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 href="#" class="toolbar">Others</a>
4
8954
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. I create the navigatURL from database dynamically. I see the same question mentioned here but the response is not souitable for me: http://www.dotnet247.com/247reference/msgs/11/57708.aspx
3
1979
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) %>" ID="Hyperlink1">BEmail </asp:hyperlink> I would like to construct a url based upon the contents of a textbox. Any ideas?
4
4397
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 possible? This is my hyperlink: <asp:HyperLink id="hplShoppingCart" runat="server" Font-Size="Larger" Font-Names="Arial" NavigateUrl="../forms/ProductOrder.aspx?fn=c">Shopping Cart</asp:HyperLink>
5
6689
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 but here is the snippet of my asp:hyperlink object; <asp:HyperLink NavigateUrl="authonly/clientdetails.aspx?searchID="+<%#DataBinder.Eval(Conta iner.DataItem,"CLIENTREF")%> ID="Hyperlink1"><%#DataBinder.Eval(Container.DataItem,...
3
1602
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 formatted the hyperlink appears but I can't click on it. Could someone please let me know how to format this correctly? <asp:HyperLink id="hlBarcodes" style="Z-INDEX: 112; LEFT: 465px; POSITION: absolute; TOP: 115px" runat="server"...
9
2719
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= '<%# String.Format("Toyota/Images/Showroom/" & Container.DataItem("PathToDisplyPic"))%>' NavigateUrl='<%#
9
28050
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, "DataItem.name") %>' NavigateUrl='<%# "site.aspx?id=" + DataBinder.Eval (Container.DataItem,"id").ToString()%>' Target="_blank"> </asp:HyperLink>
7
7047
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 window. <ASP:HYPERLINK ID="lnkNewWin" RUNAT="server" NAVIGATEURL="#" ONCLICK="javascript:window.open('NewWin.aspx?PK=<%# DataBinder.Eval(Container.DataItem,"PK")%>','','toolbar=0,width=600,height=600,scollbars=1')" TEXT="Click"></ASP:HYPERLINK> ...
0
9621
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10264
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10039
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9914
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8937
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6716
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5355
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
3610
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2851
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.