473,394 Members | 2,020 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.

Why does downloading a file break the webpage?

There must be something I'm missing. No else else seems to have this
issue -- at least I don't see it mentioned anywhere.

(Also, my appologies for my earlier posts in which I mistakenly referred to
a <Select> tag as a webcontrol dropdownlist. Here's what's happening:

I have a page inside a frame. On it are a couple of links and a <Select>
tag. The selection list has nothing to do with the links and it works
fine -- usually.

I want one of the links to allow the user to download a short dynamically
created tab-delimited list (*.tab) to his computer. So, I have the follwing
html on the page:

<A href="download.aspx">Download List</A>

Now, here's the code form download.aspx:

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
'just testing for now, will put real data here later
Dim S As String = "value1" & vbTab & "value2" & vbCrLf & "value3" & vbTab &
"value4"
Response.Clear()
Response.ContentType = "text/tab-separated-values"
Response.AppendHeader("Content-Disposition", "attachment;filename=" &
"myfile.tab")
Response.Write(S)
Response.End()
End Sub

It seems to work fine. The file downloads and looks ok. BUT, after I
download a file, the Selection Box no longer functions unless I reload the
page. It gives me an "Access is denied" error whenever I select a new
value. One note: I have an onchange attribute set for it, which calls a
javascript function that opens a child window.

PLEASE, I'm desperate. Any ideas what's happening? Why does downloading a
file break my web page?

Thanks,

Jeff
Nov 17 '05 #1
4 1269
Hi,

Can you send me (SP*******@dao2com.com) sample project?

Natty Gur[MVP]
Phone Numbers:
Office: +972-(0)9-7740261
Fax: +972-(0)9-7740261
Mobile: +972-(0)58-888377
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 17 '05 #2
Hi,

Can you send me (SP*******@dao2com.com) sample project?

Natty Gur[MVP]
Phone Numbers:
Office: +972-(0)9-7740261
Fax: +972-(0)9-7740261
Mobile: +972-(0)58-888377
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 17 '05 #3
Thank you!

I grabbed all the relevent code and stuck it into a new project and ... the
problem didn't occur. The only difference was the test project I was
preparing to send you did not use frames. So, I stuck it into a frameset
and, voila! got the error. So I pondered for a few moments, tried setting
the target of the link to _top and that seemed to take care of it! Somehow,
linking to a file (or stream or whatever) from inside a frame caused
controls on the page to get "Access is Denied" errors. Setting the target
to _top though, seems to eliminate the problem.

If you're still interested, I'll send off the test project anyway. Let me
know.

Thanks!

Jeff
"Natty Gur" <na***@dao2com.com> wrote in message
news:Og**************@TK2MSFTNGP09.phx.gbl...
Hi,

Can you send me (SPAMna***@dao2com.com) sample project?

Natty Gur[MVP]
Phone Numbers:
Office: +972-(0)9-7740261
Fax: +972-(0)9-7740261
Mobile: +972-(0)58-888377
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 17 '05 #4
Thank you!

I grabbed all the relevent code and stuck it into a new project and ... the
problem didn't occur. The only difference was the test project I was
preparing to send you did not use frames. So, I stuck it into a frameset
and, voila! got the error. So I pondered for a few moments, tried setting
the target of the link to _top and that seemed to take care of it! Somehow,
linking to a file (or stream or whatever) from inside a frame caused
controls on the page to get "Access is Denied" errors. Setting the target
to _top though, seems to eliminate the problem.

If you're still interested, I'll send off the test project anyway. Let me
know.

Thanks!

Jeff
"Natty Gur" <na***@dao2com.com> wrote in message
news:Og**************@TK2MSFTNGP09.phx.gbl...
Hi,

Can you send me (SPAMna***@dao2com.com) sample project?

Natty Gur[MVP]
Phone Numbers:
Office: +972-(0)9-7740261
Fax: +972-(0)9-7740261
Mobile: +972-(0)58-888377
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 17 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Luke StClair | last post by:
Only marginally belonging in this newsgroup... but oh well. I've just started writing in python, and I want to make the files available on the web. So I did the standard <a...
1
by: Rajiv Barik | last post by:
hi , I am trying to download a zip file from a http site using webResponse . here's the code WebRequest wReq ; wReq = WebRequest.Create(wUri ) ; wReq.Credentials = new NetworkCredential...
11
by: JS | last post by:
Dear Group, I have a webpage of small images. At the bottom is a Javascript function. If someone scrolls impatiently to the function link, when the action is complete the html does not continue...
0
by: brian.fairchild | last post by:
I have a downloader page in my asp.net application that looks at a session variable to get the path to the file, checks it then downloads it using the Response object. When the "File Download"...
10
by: mwt | last post by:
This code works fine to download files from the web and write them to the local drive: import urllib f = urllib.urlopen("http://www.python.org/blah/blah.zip") g = f.read() file =...
1
by: Hexman | last post by:
Code below ---- I'm trying to save some specific web pages to disk as text files. I searched the Internet and found a basic example which I changed to fit my needs. I tested it out first on a...
3
by: OriginalBrownster | last post by:
I am currently uploading a file from a users computer to the file system on my server using python, just reading the file and writing the binaries. total_data=' ' while True: data =...
7
by: Steve | last post by:
Hello, I am a beginner/intermediate c++ coder. I have a program that I am writing and would like to be able to distribute to some of my friends. The problem with this is that the data files...
1
by: JRussell | last post by:
Hi, I am trying to download sql database through asp on my webpage and I keep getting weird outcomes in Excel. I have had to put in <char10> and <char13> into my sql data to have it display...
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:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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.