By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
458,221 Members | 1,214 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 458,221 IT Pros & Developers. It's quick & easy.

Why does downloading a file break the webpage?

P: n/a
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
Share this Question
Share on Google+
4 Replies


P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.