Results 1 to 3 of 3

Thread: Response.ContentType

  1. #1
    Join Date
    Dec 1969

    Default Response.ContentType

    I am using Response.ContentType to transform the page into MS excel format, here is the code:<BR>&#060;%Response.ContentType = "application/"%&#062;<BR>It successed, however, it uploaded into same brower as previous page. I wonder how it will be able to tranform into seperated brower?<BR><BR>Please help!

  2. #2
    Join Date
    Dec 1969

    Default Nothing to do with contenttype

    You&#039;d have the same problem with an ordinary HTML page, wouldn&#039;t you? By default, clicking on a link or submitting a form *always* replaces the *current* page.<BR><BR>YOu just need a TARGET= in your link or form tag:<BR><BR>&#060;A Target="MyExcelWindow" ... &#062;<BR>or<BR>&#060;FORM Target="TheSpreadsheet" ... &#062;<BR><BR>The name of the target doesn&#039;t really matter, so long as it doesn&#039;t match a name already in use.<BR><BR>

  3. #3
    Join Date
    Dec 1969

    Default RE: Response.ContentType

    If you want to pop open a save as window that will then pop excel if you choose to open, put this line of code right after your &#060;%Response.ContentType = "application/"%&#062;<BR><BR>Response.AddHeader "Content-Disposition", "attachment;filename=name.doc"<BR><BR>BOB<BR><BR>P .S. If you can tell me how to get your HTML code (tables, Bolds) etc to work consistently on peoples machines in your excel file that you create, I would appreciate it.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts