ASP Hyperlink with absolute NavigateURL? is it possible

A

Amir Eshterayeh

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
Also, I want to open a new browser window without button and menu but when I
put imagebutton in a itemtemplate of datagrid, the opened browser has all
buttons and menus. Is there is way I can use javascript like windows.open
.... status=no or use hyperlink asp control and open brower like as I said.
Thank you very much in advance.

Best Regards
Amir Eshterayeh
(e-mail address removed)
 
H

Hermit Dave

Amir,

Hyperlink can take absolute urls. Try clicking on NavigateURL in design mode
and you have a ddl where you can specify the type.. whether its doument /
root relative or absolute.
as far as opening a new window is concerned that again is not a problem
cause you can specify the target... i am using frames in one instance and i
target a different frame to load the actual page...
as far as using window.open or something like that... well have a look at
registerclientscriptblock.
well that you can pass a javascript function in a string and that string is
written to client's browser and can be vbscript or javascript... you can
write you own code to use window.open with all params...and sizes etc... and
can even like it with your hyperlink... add something like this
onclick="openwin();"
openwin being the javascript function to open new window the way you would
like to.

Hope this helps,

regards,

HD
 
A

Amir Eshterayeh

Dear Sir
Thank you. I want to change the NavigateURL 's absolute property at run
time using code which I can not find such a property. Do you have an idea? I
have both types of url so I want to change from relative to absolute in code
for hyperlink control. Is there a way?
thanks in advance amir eshterayeh
 
F

Fuccio DaVietre

Mira, yo programo en .NET utilizando Visual Studio .NET. He utilizado el
HyperLink y nunca he tenido problemas debido a que tienes que tener en mente
lo siguiente: Estas en un sitio http://www.sitio.com/ Puedes establecer en
la propiedad NavigateURL del control lo siguiente respuestas/hyperlink.aspx
que el lo tomará como una dirección relativa, ahora bien, estableces en la
propiedad http://www.otrositio.com/preguntas/preguntas.aspx y el lo tomará
como una dirección absoluta.
Espero que esto te ayude a la hora de utilizar el HyperLink.

Fuccio DaVietre
 
Joined
Feb 13, 2009
Messages
3
Reaction score
0
For the problem of absolute url binding to NavigateURL field of asp:HyperLink
Solution is to use Page_PreRender method to do the binding because it will be overwritten if you do it Page_OnLoad

can find more here
asp:HyperLink NavigateUrl Problem Absolute URL

Link: sobot-software.blogspot.com/2009/02/asphyperlink-navigateurl-problem.html

Sobot Software DotNetNuke Outsourcing
 

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

Similar Threads

Asp.net Important Topics. 0

Members online

Forum statistics

Threads
473,769
Messages
2,569,576
Members
45,054
Latest member
LucyCarper

Latest Threads

Top