Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Basics section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old October 30th, 2006, 04:16 PM
Friend of Wrox
Points: 2,876, Level: 22
Points: 2,876, Level: 22 Points: 2,876, Level: 22 Points: 2,876, Level: 22
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Denver, CO, USA.
Posts: 428
Thanks: 57
Thanked 2 Times in 2 Posts
Default File Link Won't Work

This link seems to do nothing when clicked:

<a target="Attachment" href="file:///c:\inetpub\wwwroot\Surveys\Attachments\TestAttachm ents\Control Test.xls">
Edit Control Test.xls
</a>

But pasting this into the address line in IE:

file:///c:\inetpub\wwwroot\Surveys\Attachments\TestAttachm ents\Control Test.xls

...gets the file immediately.

Can somebody explain why this is, and what I have to do to get the document to open in Excel from a link?
  #2 (permalink)  
Old October 30th, 2006, 04:34 PM
Friend of Wrox
Points: 2,876, Level: 22
Points: 2,876, Level: 22 Points: 2,876, Level: 22 Points: 2,876, Level: 22
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Denver, CO, USA.
Posts: 428
Thanks: 57
Thanked 2 Times in 2 Posts
Default

This is even stranger than I originally thought. The link rendered by ASP.NET doesn't work. But if I save the source of the ASP rendered page to my H/D and run that copy, the link works.

Clues anybody?
  #3 (permalink)  
Old October 30th, 2006, 04:48 PM
Friend of Wrox
Points: 7,395, Level: 36
Points: 7,395, Level: 36 Points: 7,395, Level: 36 Points: 7,395, Level: 36
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Capital Federal, , Argentina.
Posts: 2,189
Thanks: 5
Thanked 59 Times in 57 Posts
Send a message via MSN to gbianchi
Default

hi there.. what if you test

href="file:///c:\inetpub\wwwroot\Surveys\Attachments\TestAttachm ents\Control%20%Test.xls" ???

HTH

Gonzalo
The Following User Says Thank You to gbianchi For This Useful Post:
Ron Howerton (February 22nd, 2013)
  #4 (permalink)  
Old October 30th, 2006, 04:50 PM
Wrox Author
Points: 13,255, Level: 49
Points: 13,255, Level: 49 Points: 13,255, Level: 49 Points: 13,255, Level: 49
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2005
Location: Ohio, USA
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

In the first example you are loading into a different window, a frame prehaps, that may or may not be you problem as I have never tried to load any type of file directly into a frame like that. (My methodology was normally to pass a doc ID to the frame, set up the correct headers, and then push the file out)

You said the link is rendered by the .net framework, does that mean to imply you are running your anchor tag as a server control?

-------------------------
I will only tell you how to do it, not do it for you.
Unless, of course, you want to hire me to do work for you.

^^Thats my signature
The Following User Says Thank You to dparsons For This Useful Post:
Ron Howerton (February 22nd, 2013)
  #5 (permalink)  
Old October 30th, 2006, 04:55 PM
Friend of Wrox
Points: 2,876, Level: 22
Points: 2,876, Level: 22 Points: 2,876, Level: 22 Points: 2,876, Level: 22
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Denver, CO, USA.
Posts: 428
Thanks: 57
Thanked 2 Times in 2 Posts
Default

Tried replacing " " with "%20" already. Same result - doesn't work on the rendered page, works after saving the page to local H/d.

<A> tag is being written by VB.NET code - not hardcoded on page. Same old dynamically generated page issue.
  #6 (permalink)  
Old October 30th, 2006, 04:57 PM
Wrox Author
Points: 13,255, Level: 49
Points: 13,255, Level: 49 Points: 13,255, Level: 49 Points: 13,255, Level: 49
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2005
Location: Ohio, USA
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

So, your local environment structure mirrors that of your development environment? e.g. file:///c:\inetpub\wwwroot\Surveys\Attachments\TestAttachm ents\Control Test.xls exists the same in both places


-------------------------
I will only tell you how to do it, not do it for you.
Unless, of course, you want to hire me to do work for you.

^^Thats my signature
The Following User Says Thank You to dparsons For This Useful Post:
Ron Howerton (February 22nd, 2013)
  #7 (permalink)  
Old October 30th, 2006, 05:04 PM
Friend of Wrox
Points: 2,876, Level: 22
Points: 2,876, Level: 22 Points: 2,876, Level: 22 Points: 2,876, Level: 22
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Denver, CO, USA.
Posts: 428
Thanks: 57
Thanked 2 Times in 2 Posts
Default

The environment where the problem is occuring is my local development enviroment. The path it's trying to link to is on the very same computer as VS, it's completely shared, etc. So, there is only one place for the file to exist. I can upload files to the path. I can delete files from the path. I can download by either pasting the link directly to the browser, or using the link after saving the .net source HTML to my local H/D (where the file exists), but not when the page is first returned to the browser from VS.

I cannot understand why the link does not work until after the HTML has been saved to my local H/D? What's the difference?
  #8 (permalink)  
Old October 30th, 2006, 05:17 PM
Wrox Author
Points: 13,255, Level: 49
Points: 13,255, Level: 49 Points: 13,255, Level: 49 Points: 13,255, Level: 49
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2005
Location: Ohio, USA
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

Ahh it was a bit confusing when you said: saved to my local H/D It sounded as though you were working in 2 different environments.

My last suggestion would be to try a relative path as opposed to a direct path:

a href="./surveys/attachments/testattachments/control test.xls"

-------------------------
I will only tell you how to do it, not do it for you.
Unless, of course, you want to hire me to do work for you.

^^Thats my signature
The Following User Says Thank You to dparsons For This Useful Post:
Ron Howerton (February 22nd, 2013)
  #9 (permalink)  
Old October 30th, 2006, 05:23 PM
Friend of Wrox
Points: 2,876, Level: 22
Points: 2,876, Level: 22 Points: 2,876, Level: 22 Points: 2,876, Level: 22
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Denver, CO, USA.
Posts: 428
Thanks: 57
Thanked 2 Times in 2 Posts
Default

Close.

href=".\Attachments\TestAttachments\Control Test.xls"

...opens the file, but in read only mode. I need to open it so that it can be saved back to its location. Is there some undocumented attribute I need to add to get it to do that?
  #10 (permalink)  
Old October 30th, 2006, 05:41 PM
Wrox Author
Points: 13,255, Level: 49
Points: 13,255, Level: 49 Points: 13,255, Level: 49 Points: 13,255, Level: 49
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2005
Location: Ohio, USA
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

Uhh. While I am sure it is possible to do what you want to do, I know of no way of doing it. Because, essentially, what you are talking about is hosting the Excel runtime in the Browser environment with a "connected" state to the server.

The only way i know to get full perms is to download it to your machine.

-------------------------
I will only tell you how to do it, not do it for you.
Unless, of course, you want to hire me to do work for you.

^^Thats my signature
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Trying to figure out how to work a link issue gene4455 VBScript 0 October 22nd, 2008 12:06 PM
Link button in nested grids clcik doesnt work fir RaghaSM ASP.NET 2.0 Basics 1 June 26th, 2008 12:05 AM
How does Update Link in FormView work? URGENT shaly ASP.NET 2.0 Professional 0 December 7th, 2006 04:10 PM
Link Button does not work properly nitinp ASP.NET 2.0 Basics 0 November 9th, 2006 06:02 AM



All times are GMT -4. The time now is 07:24 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.