Q: Response.Write

G

Guest

Hello,
I use this:
Response.Redirect("/Files/myFile.xls") which is working fine but shows
address bar and I am trying to get rid of it.

So if I have the following, will this let me see excel file? If yes, can you
complete Response.Write?

Dim fileAndPath as string
fileAndPath = DD.SelectedItem.Value ‘ this has mFile.xls
‘Response.Redirect("/Files/†& fileAndPath) change this to ….
Response.Write(" <script> window.open(“???â€) </script> ")


Thanks,
Jim.
 
G

Guest

I could not believe that this is really this difficult and takes this much
time. Response.WriteFile could not replace Response.Redirect unless you do
many other things.

Here is part of my code.

Response.Clear()
Response.ContentType = "Application/x-msexcel"
Response.WriteFile("D:\Files\myFile.xls")
Response.End()

This tries to open my main.aspx and ends up saying: the file referenced by
shortcut file “a file name in the temporary internet files folder†can not
be opened.
Any idea?
 
G

Guest

I think I solved this. thanks.

JIM.H. said:
I could not believe that this is really this difficult and takes this much
time. Response.WriteFile could not replace Response.Redirect unless you do
many other things.

Here is part of my code.

Response.Clear()
Response.ContentType = "Application/x-msexcel"
Response.WriteFile("D:\Files\myFile.xls")
Response.End()

This tries to open my main.aspx and ends up saying: the file referenced by
shortcut file “a file name in the temporary internet files folder†can not
be opened.
Any idea?
 
K

Karl Seguin

Since you posted the same question twice and got good help both time, it
would be kind of you to post the final solution so that it might help others
and help us whom tried to help you better help others in the future :)

Karl
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top