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

Problem with dynamic hyperlink

33
Hi,
I have a hyperlink field in my Access database. A file attachment will be present in some of the records. In my search ASP page, I am showing the results in a table and want to give href to one of its columns, if hyperlink is present in that record.
My code is as follows:
<TD nowrap borderColor=#800000 width="190"> <A href= "<%=trim(rs(7))%>" > <FONT size=3><%=rs(2)%></FONT> </A> </TD>

where rs(7) is the hyperlink field and rs(2) is the field which I want to give the link.

But this is not working.
When pointing to this, it is showing:

http://localhost/mypage/page3.asp#Docs\Document1.doc#

where "mypage" is my folder, page3.asp is my current page and the attached file is "mypage\Docs\Document1.doc"

Is my code silly ?
Can anybody help me ??

Matsam
Jul 6 '07 #1
5 1548
ak1dnar
1,584 Expert 1GB
This is Not a URL to the file.
Expand|Select|Wrap|Line Numbers
  1. http://localhost/mypage/page3.asp#Docs\Document1.doc#
It should be like this

Expand|Select|Wrap|Line Numbers
  1. http://localhost/mypage/page3.asp/Docs/Document1.doc
You have to replace the "\" with "/" for the absolute URL for the doc file.

Hope this may helps to you. thanks!
Jul 6 '07 #2
Matsam
33
This is Not a URL to the file.
Expand|Select|Wrap|Line Numbers
  1. http://localhost/mypage/page3.asp#Docs\Document1.doc#
It should be like this

Expand|Select|Wrap|Line Numbers
  1. http://localhost/mypage/page3.asp/Docs/Document1.doc
You have to replace the "\" with "/" for the absolute URL for the doc file.

Hope this may helps to you. thanks!

Hi,

Thanks for ur reply. But I'm sorry, it didnt work..
When I click the link, nothing happens to the page. But the address chages to http://localhost/mypage/page3.asp#Docs\Document1.doc#
When I remove "page3.asp#" from the address, it is working.. The document is opened.
What may be wrong ?
Plz help me..

Matsam
Jul 7 '07 #3
ak1dnar
1,584 Expert 1GB
This is Not a URL to the file.
Expand|Select|Wrap|Line Numbers
  1. http://localhost/mypage/page3.asp#Docs\Document1.doc#
It should be like this

Expand|Select|Wrap|Line Numbers
  1. http://localhost/mypage/page3.asp/Docs/Document1.doc
You have to replace the "\" with "/" for the absolute URL for the doc file.

Hope this may helps to you. thanks!
Oops My Bad mistake!You Have to print the URL like this.

Expand|Select|Wrap|Line Numbers
  1. http://localhost/mypage/Docs/Document1.doc
Jul 7 '07 #4
Matsam
33
Oops My Bad mistake!You Have to print the URL like this.

Expand|Select|Wrap|Line Numbers
  1. http://localhost/mypage/Docs/Document1.doc
Hi,

Thank you for ur help. I have given the complete path in href line and now it is solved. Thanks again

Matsam
Jul 9 '07 #5
ak1dnar
1,584 Expert 1GB
Hi,

Thank you for ur help. I have given the complete path in href line and now it is solved. Thanks again

Matsam
I'm So glad to here that. :)
-Ajaxrand
Jul 9 '07 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Rob Rogers | last post by:
I am old programmer, but this asp.net stuff throws me for a loop. I have an asp.net page that I need to create a dynamic hyperlink from based on the user selection from the drop down list and...
1
by: Gerald Baeck | last post by:
I want to realize a dynamic hyperlink, which changes onclick it's text and it's navigateurl. Unfortunately there is no event for a hyperlink like onclick for buttons. Is there another way to...
2
by: Jason | last post by:
I have a data grid with a hyperlink column. The hyperlink is created by a class that extracts the link from an XML Document. How can I populate the hyperlink column in the data grid with the...
3
by: sloesch | last post by:
I am working with VS.net 2003, framework 1.1, developing with VB.net, and ASP.net, and I would like to know how you can create a dynamic hyperlink on the fly to a document stored in a SQL database?...
1
by: sweetpotatop | last post by:
Hello, I would like to create dynamic hyperlinks in a web page when it is first loaded by using ASP.NET. Basically there will be a list of documents in a folder and I will list them all as a...
2
by: Dominique | last post by:
Is it possible to change the size of a Dynamic Panel and fix it? Thanks, -- Dominique
1
by: mitramay | last post by:
I am creating a dynamic datagrid. The controls in some of the template columns will have to be generated based on the data contained in them (i.e. the data for that respective DataField column)....
1
by: Carlos | last post by:
Hi all, I need to create a set of dynamic hyperlinks in a page. I got: PlaceHolder mainpanel = new PlaceHolder(); foreach (DataRow row in events_table.Rows) {
1
by: mister-Ed | last post by:
I am displaying subcategories in my datalist, and now I have a bizarre thing happen when I add a new subcategory record in my sql database, the new subcategory link does not click into the next...
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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.