Hyperlinking Problem

Ask a Question related to ASP Database, Design and Development.

  1. #1

    Default Hyperlinking Problem

    Hi All

    I have an application which acts as a small document management system. Our
    users upload the document to the server and the application allows them to
    search the record and view the files in the browser.

    I am storing the name of the file in the database table and when a user
    wants to view the record the asp Page spits out the hyperlinks to the file
    to allow the user to view them

    The only problem I have is when there is a file which has spaces in the name
    of the file

    for example accounts for july.doc won't hyperlink properly and the user only
    sees

    [url]http://myserver/files/accounts[/url]

    where in it should be [url]http://myserver/files/accounts[/url] for july.doc (even here
    has left out the second part)

    where as

    accountsforjuly.doc will hyperlink fine. like
    [url]http://myserver/files/accountsforjuly.doc[/url] as there are no spaces in the file
    name.

    Does anyone know what I can do to get the 20% instead of the space in the
    file name so it hyperlinks properly or any other solution for this.

    Thanks

    Jas


    J P Singh Guest

  2. Similar Questions and Discussions

    1. Hyperlinking to a HTML page
      I have just started using Flash and have created my first movie. I have a button that I would like to open a HTML file (On a CD). I guess this...
    2. Flash Banners - properly hyperlinking
      I had someone provide us with a Flash ad banner which did not have the hyperlink embedded. Is this appropriate? They told me to wrap HTML code...
    3. Hyperlinking to data files in MSP 2003
      Can someone please take me step by step through how you hyperlink to a data file in Publisher 2003? I know how hyperlinks work, how to create them...
    4. hyperlinking on an swf file in dreamweaver?
      Hello one and all: Quick question using Dreamweaver MX. Great feature is to be able to quickly add a flash button, tell it where to link to and...
    5. Hyperlinking and ASP.NEt Session
      Hi, I am trying to design a Home page for my applicatiion in which i want show the links for for some itms... I tried to put the following <td>...
  3. #2

    Default Re: Hyperlinking Problem

    Response.Write "<a href=""http://myserver/files/accounts for july.doc"">"

    "J P Singh" <noemail@asIhatespam> wrote in message
    news:%23enmrNeUDHA.2364@TK2MSFTNGP09.phx.gbl...
    > Hi All
    >
    > I have an application which acts as a small document management system.
    Our
    > users upload the document to the server and the application allows them to
    > search the record and view the files in the browser.
    >
    > I am storing the name of the file in the database table and when a user
    > wants to view the record the asp Page spits out the hyperlinks to the file
    > to allow the user to view them
    >
    > The only problem I have is when there is a file which has spaces in the
    name
    > of the file
    >
    > for example accounts for july.doc won't hyperlink properly and the user
    only
    > sees
    >
    > [url]http://myserver/files/accounts[/url]
    >
    > where in it should be [url]http://myserver/files/accounts[/url] for july.doc (even
    here
    > has left out the second part)
    >
    > where as
    >
    > accountsforjuly.doc will hyperlink fine. like
    > [url]http://myserver/files/accountsforjuly.doc[/url] as there are no spaces in the
    file
    > name.
    >
    > Does anyone know what I can do to get the 20% instead of the space in the
    > file name so it hyperlinks properly or any other solution for this.
    >
    > Thanks
    >
    > Jas
    >
    >

    Tom B Guest

  4. #3

    Default Re: Hyperlinking Problem

    look up Server.URLencode - that should do the trick


    "J P Singh" <noemail@asIhatespam> wrote in message
    news:#enmrNeUDHA.2364@TK2MSFTNGP09.phx.gbl...
    > Hi All
    >
    > I have an application which acts as a small document management system.
    Our
    > users upload the document to the server and the application allows them to
    > search the record and view the files in the browser.
    >
    > I am storing the name of the file in the database table and when a user
    > wants to view the record the asp Page spits out the hyperlinks to the file
    > to allow the user to view them
    >
    > The only problem I have is when there is a file which has spaces in the
    name
    > of the file
    >
    > for example accounts for july.doc won't hyperlink properly and the user
    only
    > sees
    >
    > [url]http://myserver/files/accounts[/url]
    >
    > where in it should be [url]http://myserver/files/accounts[/url] for july.doc (even
    here
    > has left out the second part)
    >
    > where as
    >
    > accountsforjuly.doc will hyperlink fine. like
    > [url]http://myserver/files/accountsforjuly.doc[/url] as there are no spaces in the
    file
    > name.
    >
    > Does anyone know what I can do to get the 20% instead of the space in the
    > file name so it hyperlinks properly or any other solution for this.
    >
    > Thanks
    >
    > Jas
    >
    >

    only_me Guest

  5. #4

    Default Re: Hyperlinking Problem

    server.urlencode doesn't work unfortuently.

    here is the actual line of code

    <td width="29%"><a href=\includes\<%=rs("filename")%>View File</a>

    "only_me" <only_me@hotmail.com> wrote in message
    news:Oidg8TeUDHA.412@tk2msftngp13.phx.gbl...
    > look up Server.URLencode - that should do the trick
    >
    >
    > "J P Singh" <noemail@asIhatespam> wrote in message
    > news:#enmrNeUDHA.2364@TK2MSFTNGP09.phx.gbl...
    > > Hi All
    > >
    > > I have an application which acts as a small document management system.
    > Our
    > > users upload the document to the server and the application allows them
    to
    > > search the record and view the files in the browser.
    > >
    > > I am storing the name of the file in the database table and when a user
    > > wants to view the record the asp Page spits out the hyperlinks to the
    file
    > > to allow the user to view them
    > >
    > > The only problem I have is when there is a file which has spaces in the
    > name
    > > of the file
    > >
    > > for example accounts for july.doc won't hyperlink properly and the user
    > only
    > > sees
    > >
    > > [url]http://myserver/files/accounts[/url]
    > >
    > > where in it should be [url]http://myserver/files/accounts[/url] for july.doc (even
    > here
    > > has left out the second part)
    > >
    > > where as
    > >
    > > accountsforjuly.doc will hyperlink fine. like
    > > [url]http://myserver/files/accountsforjuly.doc[/url] as there are no spaces in the
    > file
    > > name.
    > >
    > > Does anyone know what I can do to get the 20% instead of the space in
    the
    > > file name so it hyperlinks properly or any other solution for this.
    > >
    > > Thanks
    > >
    > > Jas
    > >
    > >
    >
    >

    J P Singh Guest

  6. #5

    Default Re: Hyperlinking Problem

    Now we see your code we can see that Tom B is right you need to quote that
    href variable

    "J P Singh" <noemail@asIhatespam> wrote in message
    news:eflZCZeUDHA.3220@tk2msftngp13.phx.gbl...
    > server.urlencode doesn't work unfortuently.
    >
    > here is the actual line of code
    >
    > <td width="29%"><a href=\includes\<%=rs("filename")%>View File</a>
    >
    > "only_me" <only_me@hotmail.com> wrote in message
    > news:Oidg8TeUDHA.412@tk2msftngp13.phx.gbl...
    > > look up Server.URLencode - that should do the trick
    > >
    > >
    > > "J P Singh" <noemail@asIhatespam> wrote in message
    > > news:#enmrNeUDHA.2364@TK2MSFTNGP09.phx.gbl...
    > > > Hi All
    > > >
    > > > I have an application which acts as a small document management
    system.
    > > Our
    > > > users upload the document to the server and the application allows
    them
    > to
    > > > search the record and view the files in the browser.
    > > >
    > > > I am storing the name of the file in the database table and when a
    user
    > > > wants to view the record the asp Page spits out the hyperlinks to the
    > file
    > > > to allow the user to view them
    > > >
    > > > The only problem I have is when there is a file which has spaces in
    the
    > > name
    > > > of the file
    > > >
    > > > for example accounts for july.doc won't hyperlink properly and the
    user
    > > only
    > > > sees
    > > >
    > > > [url]http://myserver/files/accounts[/url]
    > > >
    > > > where in it should be [url]http://myserver/files/accounts[/url] for july.doc
    (even
    > > here
    > > > has left out the second part)
    > > >
    > > > where as
    > > >
    > > > accountsforjuly.doc will hyperlink fine. like
    > > > [url]http://myserver/files/accountsforjuly.doc[/url] as there are no spaces in
    the
    > > file
    > > > name.
    > > >
    > > > Does anyone know what I can do to get the 20% instead of the space in
    > the
    > > > file name so it hyperlinks properly or any other solution for this.
    > > >
    > > > Thanks
    > > >
    > > > Jas
    > > >
    > > >
    > >
    > >
    >
    >

    only_me Guest

  7. #6

    Default Re: Hyperlinking Problem

    Quoting is the answer as mentioned before.

    Here is the correct line of code (one possible version):
    <td width="29%"><a href="\includes\<%=rs("filename")%
    >">View File</a>

    NOTE: You were also missing the closing > for the <a

    >-----Original Message-----
    >Now we see your code we can see that Tom B is right you
    need to quote that
    >href variable
    >
    >"J P Singh" <noemail@asIhatespam> wrote in message
    >news:eflZCZeUDHA.3220@tk2msftngp13.phx.gbl...
    >> server.urlencode doesn't work unfortuently.
    >>
    >> here is the actual line of code
    >>
    >> <td width="29%"><a href=\includes\<%=rs("filename")%
    >View File</a>
    >>
    >> "only_me" <only_me@hotmail.com> wrote in message
    >> news:Oidg8TeUDHA.412@tk2msftngp13.phx.gbl...
    >> > look up Server.URLencode - that should do the trick
    >> >
    >> >
    >> > "J P Singh" <noemail@asIhatespam> wrote in message
    >> > news:#enmrNeUDHA.2364@TK2MSFTNGP09.phx.gbl...
    >> > > Hi All
    >> > >
    >> > > I have an application which acts as a small
    document management
    >system.
    >> > Our
    >> > > users upload the document to the server and the
    application allows
    >them
    >> to
    >> > > search the record and view the files in the browser.
    >> > >
    >> > > I am storing the name of the file in the database
    table and when a
    >user
    >> > > wants to view the record the asp Page spits out the
    hyperlinks to the
    >> file
    >> > > to allow the user to view them
    >> > >
    >> > > The only problem I have is when there is a file
    which has spaces in
    >the
    >> > name
    >> > > of the file
    >> > >
    >> > > for example accounts for july.doc won't hyperlink
    properly and the
    >user
    >> > only
    >> > > sees
    >> > >
    >> > > [url]http://myserver/files/accounts[/url]
    >> > >
    >> > > where in it should be
    [url]http://myserver/files/accounts[/url] for july.doc
    >(even
    >> > here
    >> > > has left out the second part)
    >> > >
    >> > > where as
    >> > >
    >> > > accountsforjuly.doc will hyperlink fine. like
    >> > > [url]http://myserver/files/accountsforjuly.doc[/url] as there
    are no spaces in
    >the
    >> > file
    >> > > name.
    >> > >
    >> > > Does anyone know what I can do to get the 20%
    instead of the space in
    >> the
    >> > > file name so it hyperlinks properly or any other
    solution for this.
    >> > >
    >> > > Thanks
    >> > >
    >> > > Jas
    >> > >
    >> > >
    >> >
    >> >
    >>
    >>
    >
    >
    >.
    >
    John Beschler Guest

  8. #7

    Default hyperlinking problem

    I am trying to add hyperlinks to directories to my web
    sites so I can go from Publisher98 to Publisher2002. I
    have been using Publisher98.

    About a month ago, I created a directory on my web site,
    loaded the pages and image files to it, linked to it,
    added the new link to my publisher document, saved as
    html. Everything worked perfectly. But I had a series
    of health problems so I never got it uploaded. A couple
    of weeks ago, I got back to it. Now, the new link does
    not work. When I save as html, I get messages that it is
    not a valid link.

    The crazy thing is that there is another link to a
    directory in the web site that works:

    [url]http://washrag.tripod.com/blog/[/url] works
    [url]http://washrag.tripod.com/SURVEYB/[/url] does not.

    I copied the first to my address field and I can link to
    it. I copy the second to my address field and it does
    not work. If, however, I copy the first to the address
    field and insert "SURVEYB" for "blog", it links.

    I checked the html code, and the blog link is there, the
    SURVEYB link is not.

    I suspect that in the meantime, my Publisher98 has been
    hit by hackers.

    If anybody knows any other explanation and has
    instructions as to how to fix this problem, let me know,
    as I always hate to restore anything, it just takes time.

    Thanks if anyone can help.
    Janet Guest

  9. #8

    Default Re: hyperlinking problem

    I can't tell even after reading this over twice, what it is you are asking
    or having trouble with. If you are having trouble with understanding a
    folder structure I'd suggest reading
    [url]http://www.davidbartosik.com/pub2002/pub2002_27.htm[/url] . If you are having
    trouble with uploading I'd suggest the tutorial at
    [url]http://www.davidbartosik.com/ppt.htm[/url]

    --
    David Bartosik - MS MVP
    for Publisher help:
    [url]www.davidbartosik.com[/url]
    enter to win Pub 2003:
    [url]www.davidbartosik.com/giveaway.aspx[/url]


    "Janet" <anonymous@discussions.microsoft.com> wrote in message
    news:da0501c43ab9$a483fa50$a301280a@phx.gbl...
    > I am trying to add hyperlinks to directories to my web
    > sites so I can go from Publisher98 to Publisher2002. I
    > have been using Publisher98.
    >
    > About a month ago, I created a directory on my web site,
    > loaded the pages and image files to it, linked to it,
    > added the new link to my publisher document, saved as
    > html. Everything worked perfectly. But I had a series
    > of health problems so I never got it uploaded. A couple
    > of weeks ago, I got back to it. Now, the new link does
    > not work. When I save as html, I get messages that it is
    > not a valid link.
    >
    > The crazy thing is that there is another link to a
    > directory in the web site that works:
    >
    > [url]http://washrag.tripod.com/blog/[/url] works
    > [url]http://washrag.tripod.com/SURVEYB/[/url] does not.
    >
    > I copied the first to my address field and I can link to
    > it. I copy the second to my address field and it does
    > not work. If, however, I copy the first to the address
    > field and insert "SURVEYB" for "blog", it links.
    >
    > I checked the html code, and the blog link is there, the
    > SURVEYB link is not.
    >
    > I suspect that in the meantime, my Publisher98 has been
    > hit by hackers.
    >
    > If anybody knows any other explanation and has
    > instructions as to how to fix this problem, let me know,
    > as I always hate to restore anything, it just takes time.
    >
    > Thanks if anyone can help.

    David Bartosik - MS MVP Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139