473,396 Members | 1,989 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,396 software developers and data experts.

executing a hyperlink

I have a hyperlink on my aspx page added at dev time. Is there a way to
execute it from code?
Thanks,
G
Nov 18 '05 #1
7 1587
G. Dean Blake wrote:
I have a hyperlink on my aspx page added at dev time. Is there a way to
execute it from code?
Thanks,
G


Response.Redirect( <yourLinkHere> );
Nov 18 '05 #2
"it" means the hyperlink control on my page(which has target='_new'), not
just a url.

"John Hann" <jovinhan@SPAM_FREEyahoo.com> wrote in message
news:JZ********************@comcast.com...
G. Dean Blake wrote:
I have a hyperlink on my aspx page added at dev time. Is there a way to
execute it from code?
Thanks,
G


Response.Redirect( <yourLinkHere> );

Nov 18 '05 #3
G. Dean Blake wrote:
"it" means the hyperlink control on my page(which has target='_new'), not
just a url.

"John Hann" <jovinhan@SPAM_FREEyahoo.com> wrote in message
news:JZ********************@comcast.com...
G. Dean Blake wrote:

I have a hyperlink on my aspx page added at dev time. Is there a way to
execute it from code?
Thanks,
G


Response.Redirect( <yourLinkHere> );



In that case, I'm not quite sure what you're trying to accomplish.
"_new" does not have a special meaning as a value for the Target
property, so I doubt that will affect the behavior of your HyperLink.
And you're trying to "execute" it from code, does that mean redirect the
browser to the NavigateURL of the HyperLink? If you want to do that, try
this
Reponse.Redirect(yourHyperLink.NavigateURL);
If that's not what you intend to do, please be more specific.
- John
Nov 18 '05 #4
What I am trying to do is....

I want to switch to Page2.aspx using a response.redirect but I want
Page2.aspx to display in a New Browser Window. If I simply execute
response.redirect(page2.aspx) it will display in the same browser window.

If I have a hyperlink added at design time and specify '_new' in the target
property it will pop up a new window when that hyperlink is clicked by the
user. But if I try to execute that hyperlink from code by doing
response.redirect(myHyperlink.NavigateURL) it simply uses that string and
doesn't really execute the hyperlink in the web page (that has Target='_new'
in it).
G
"John Hann" <jovinhan@SPAM_FREEyahoo.com> wrote in message
news:ez**************@TK2MSFTNGP12.phx.gbl...
G. Dean Blake wrote:
"it" means the hyperlink control on my page(which has target='_new'), not just a url.

"John Hann" <jovinhan@SPAM_FREEyahoo.com> wrote in message
news:JZ********************@comcast.com...
G. Dean Blake wrote:
I have a hyperlink on my aspx page added at dev time. Is there a way toexecute it from code?
Thanks,
G

Response.Redirect( <yourLinkHere> );



In that case, I'm not quite sure what you're trying to accomplish.
"_new" does not have a special meaning as a value for the Target
property, so I doubt that will affect the behavior of your HyperLink.
And you're trying to "execute" it from code, does that mean redirect the
browser to the NavigateURL of the HyperLink? If you want to do that, try
this
Reponse.Redirect(yourHyperLink.NavigateURL);
If that's not what you intend to do, please be more specific.
- John

Nov 18 '05 #5
G. Dean Blake wrote:
What I am trying to do is....

I want to switch to Page2.aspx using a response.redirect but I want
Page2.aspx to display in a New Browser Window. If I simply execute
response.redirect(page2.aspx) it will display in the same browser window.

If I have a hyperlink added at design time and specify '_new' in the target
property it will pop up a new window when that hyperlink is clicked by the
user. But if I try to execute that hyperlink from code by doing
response.redirect(myHyperlink.NavigateURL) it simply uses that string and
doesn't really execute the hyperlink in the web page (that has Target='_new'
in it).
G


Ok, now I understand. I don't know if you can get the behavior you're
looking for without a hack. Here's what I've done when faced with the
same problem. Write an onload javascript function for your page's body
element. That onload function should check an hidden HTML input for a
URL value and, if one is found, popup a window with that URL in it. That
hidden variable should also have "runat=server" specified. When you want
to popup the window from server-side code, set the hidden form variable
to the url you want to popup, and the onload function will do the dirty
work for you.
- John
Nov 18 '05 #6
while you can write javascript to do this, popup blockers will stop you.
"G. Dean Blake" <De**@nospam.com> wrote in message
news:Oi**************@TK2MSFTNGP12.phx.gbl...
"it" means the hyperlink control on my page(which has target='_new'), not
just a url.

"John Hann" <jovinhan@SPAM_FREEyahoo.com> wrote in message
news:JZ********************@comcast.com...
G. Dean Blake wrote:
I have a hyperlink on my aspx page added at dev time. Is there a way to execute it from code?
Thanks,
G


Response.Redirect( <yourLinkHere> );


Nov 18 '05 #7


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 18 '05 #8

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

Similar topics

5
by: Rob V | last post by:
I was wondering whether there was any way of loading an executable or windows shortcut from within a browser using Javascript or something similar. This is for use in an active desktop html file...
1
by: Badboy36 | last post by:
Hello user from googlegroups, i made a microsoft access database with front and backend. i created the backend in microsoft access97. for the frontend i made two versions (one for microsoft...
0
by: Ryan Harvey | last post by:
Hi all, I have written a web user control that contains a repeater control. the ItemTemplate for this control is basically 6 Hyperlinks in a row, that are dynamically allocated one of 7 gif...
4
by: Guadala Harry | last post by:
Suppose I have a hyperlink that, when clicked, executes a JavaScript function on the client. Separately I have a button that, when clicked, causes a post back and executes a server-side function,...
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...
10
by: david | last post by:
Hi, all: I need a help from you about DataGrid control. I created a DataGrid, dg, in design view of .NET visual Stadio and use the builder to add a Hyperlink column to dg. I want to try to assign...
8
by: Nathan Sokalski | last post by:
I have several System.Web.UI.WebControls.HyperLink Controls which I want to display as rollover images. I know how to make these manually using the <a> and <img> tags or the <a> tag and a...
20
by: tshad | last post by:
I had posted this problem earlier and just noticed that the Hyperlink is the problem. Apparently, it doesn't figure out the path correctly. It uses the path of the file it is in, even if it is...
10
by: sierra7 | last post by:
I'm trying to create a form where a user enters a document reference number and then clicks a command button to add a hyperlink to the document, via a file picker. Thanks to Adezii's excellent...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
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,...
0
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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...
0
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,...

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.