ASP Hyperlink with absolute NavigateURL? is it possible

Discussion in 'ASP .Net' started by Amir Eshterayeh, Dec 25, 2003.

  1. 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
     
    Amir Eshterayeh, Dec 25, 2003
    #1
    1. Advertising

  2. Amir Eshterayeh

    Hermit Dave Guest

    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

    "Amir Eshterayeh" <> wrote in message
    news:...
    > 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
    >
    >
    >
     
    Hermit Dave, Dec 25, 2003
    #2
    1. Advertising

  3. 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
    "Hermit Dave" <> wrote in message
    news:...
    > 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
    >
    > "Amir Eshterayeh" <> wrote in message
    > news:...
    > > 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
    > >
    > >
    > >

    >
    >
     
    Amir Eshterayeh, Dec 25, 2003
    #3
  4. Amir Eshterayeh

    Hermit Dave Guest

    Amir,

    <td height="25">
    <asp:HyperLink id="lnkDownloads" runat="server"
    cssclass="CommandButton" Target="itemdisplay"
    NavigateUrl=http://www.microsoft.com/downloads/search.aspx?displaylang=en
    >Downloads</asp:HyperLink>

    </td>

    nothing to worry bout absolute... or relative... and just works fine on my
    machine....

    hope this helps...

    hd


    "Amir Eshterayeh" <> wrote in message
    news:%...
    > 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
    > "Hermit Dave" <> wrote in message
    > news:...
    > > 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
    > >
    > > "Amir Eshterayeh" <> wrote in message
    > > news:...
    > > > 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
    > > >
    > > >
    > > >

    > >
    > >

    >
    >
     
    Hermit Dave, Dec 25, 2003
    #4
  5. 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

    "Amir Eshterayeh" <> escribió en el mensaje
    news:...
    > 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
    >
    >
    >
     
    Fuccio DaVietre, Dec 25, 2003
    #5
  6. Amir Eshterayeh

    Sobot

    Joined:
    Feb 13, 2009
    Messages:
    3
    Location:
    Belgrade
    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
     
    Sobot, Feb 13, 2009
    #6
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Boban Dragojlovic
    Replies:
    3
    Views:
    3,070
    vMike
    Oct 29, 2003
  2. Mark Fox

    Hyperlink NavigateUrl

    Mark Fox, Nov 3, 2003, in forum: ASP .Net
    Replies:
    5
    Views:
    9,356
    Mark Fox
    Nov 4, 2003
  3. Cynic07
    Replies:
    0
    Views:
    435
    Cynic07
    May 20, 2004
  4. gerry

    asp:Hyperlink NavigateUrl problem

    gerry, Jan 18, 2006, in forum: ASP .Net
    Replies:
    3
    Views:
    8,621
    Sobot
    Feb 13, 2009
  5. Carl Grainger

    asp:hyperlink - NavigateURL is always relative. I need absolute.

    Carl Grainger, Sep 24, 2006, in forum: ASP .Net Web Controls
    Replies:
    1
    Views:
    389
    Carl Grainger
    Sep 25, 2006
Loading...

Share This Page