referencing and anchor from within a usercontrol (ascx)

Discussion in 'ASP .Net Building Controls' started by gary, Dec 19, 2005.

  1. gary

    gary Guest

    Hi,

    I am trying to reference an anchor in a user control with a url. This
    worked in 1.1 but no longer works in 2.0.

    The ascx control is located in a "/include" folder

    If you have a hyperlink control and you assign the navigateurl property =
    "../#anchor" whereby you want to add this # reference to the current url the
    url ends up with the #anchor twice.

    In other words, instead of getting:
    http://www.myweb.com?somevar=abc#anchor
    it renders
    http://www.myweb.com?somevar=abc#anchor#anchor

    if i leave off the "../" it renders with one "#anchor" but as
    http://www.myweb.com/include/#anchor

    which is incorrect for what i need to do.

    Any ideas why this is coming up twice and how to fix it. I don't want to
    have to move the includes out of the include folder and into the root
    directory of the web and then have to fix every other locations where they
    are referenced with the "../"

    Thanks,

    Gary
     
    gary, Dec 19, 2005
    #1
    1. Advertising

  2. Hi Gary,

    Thanks for your posting.
    Regarding on this issue, I've noticed your another duplicated thread in the

    microsoft.public.dotnet.framework.aspnet newsgroup.

    I've posted my response there. I'd appreciate if you have a look there.
    Also, if you feel it convenient that we continue to discuss in that thread,
    please feel free to post there.

    Thanks,

    Steven Cheng
    Microsoft Online Support

    Get Secure! www.microsoft.com/security
    (This posting is provided "AS IS", with no warranties, and confers no
    rights.)
    --------------------
    | From: "gary" <>
    | Subject: referencing and anchor from within a usercontrol (ascx)
    | Date: Mon, 19 Dec 2005 16:21:59 -0500
    | Lines: 33
    | X-Priority: 3
    | X-MSMail-Priority: Normal
    | X-Newsreader: Microsoft Outlook Express 6.00.2900.2670
    | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2670
    | X-RFC2646: Format=Flowed; Original
    | Message-ID: <>
    | Newsgroups:
    microsoft.public.dotnet.framework.aspnet.buildingcontrols,microsoft.public.d
    otnet.framework.aspnet.webcontrols
    | NNTP-Posting-Host: user237.209.42.44.dsli.com 209.42.44.237
    | Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP10.phx.gbl
    | Xref: TK2MSFTNGXA02.phx.gbl
    microsoft.public.dotnet.framework.aspnet.webcontrols:31912
    microsoft.public.dotnet.framework.aspnet.buildingcontrols:14152
    | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.buildingcontrols
    |
    | Hi,
    |
    | I am trying to reference an anchor in a user control with a url. This
    | worked in 1.1 but no longer works in 2.0.
    |
    | The ascx control is located in a "/include" folder
    |
    | If you have a hyperlink control and you assign the navigateurl property =
    | "../#anchor" whereby you want to add this # reference to the current url
    the
    | url ends up with the #anchor twice.
    |
    | In other words, instead of getting:
    | http://www.myweb.com?somevar=abc#anchor
    | it renders
    | http://www.myweb.com?somevar=abc#anchor#anchor
    |
    | if i leave off the "../" it renders with one "#anchor" but as
    | http://www.myweb.com/include/#anchor
    |
    | which is incorrect for what i need to do.
    |
    | Any ideas why this is coming up twice and how to fix it. I don't want to
    | have to move the includes out of the include folder and into the root
    | directory of the web and then have to fix every other locations where they
    | are referenced with the "../"
    |
    | Thanks,
    |
    | Gary
    |
    |
    |
    |
    |
     
    Steven Cheng[MSFT], Dec 20, 2005
    #2
    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. Mark Friedman

    Referencing subcontrols within UserControl

    Mark Friedman, Jul 9, 2003, in forum: ASP .Net
    Replies:
    4
    Views:
    389
    Christopher Young
    Jul 14, 2003
  2. gary
    Replies:
    3
    Views:
    3,083
    Steven Cheng[MSFT]
    Dec 21, 2005
  3. Mark Friedman
    Replies:
    0
    Views:
    138
    Mark Friedman
    Jul 9, 2003
  4. Replies:
    2
    Views:
    539
  5. gary
    Replies:
    1
    Views:
    136
    Steven Cheng[MSFT]
    Dec 20, 2005
Loading...

Share This Page