dynamicly open file in notepad

Results 1 to 2 of 2

Thread: dynamicly open file in notepad

  1. #1
    Join Date
    Dec 1969

    Default dynamicly open file in notepad

    This is kinda repost. <BR><BR>I have a page that appears on a browser, I have a button the user can click to open the same thing but printer friendly. I would like it to open in notepad instead of the browser here is my code.<BR><BR>&#039;This for the download of the file<BR>Response.ContentType = "text/plain"<BR>response.AddHeader "content-disposition", "inline; filename=advanthistory.txt"<BR><BR>Response.Write( "History Program") & vbnewline<BR>Response.Write("Print Date: ") & todaydate & vbnewline<BR>Response.Write("Customer Name: __________________________________________________ ") & vbnewline<BR>Response.Write("Old Account Number: ") & stracct & vbnewline<BR>Response.Write("New Account Number: ") & strnewacct & vbnewline & vbnewline<BR>Response.Write("Number of Transactions: ") & icount & vbnewline & vbnewline<BR><BR>&#039;Gets the column names<BR>Response.Write ("Tran Date") & vbTab<BR>Response.Write ("Tran Type") & vbTab<BR>Response.Write ("Type Description") & vbTab<BR>Response.Write ("Next Due") & vbTab<BR>Response.Write ("Proncipal Bal") & vbTab<BR>Response.Write ("Escrow Bal") & vbTab<BR>Response.Write ("Proncipal Remain") & vbTab<BR>Response.Write ("Interest Remain") & vbTab<BR>Response.Write ("Escrow remain") & vbTab<BR>Response.Write ("Disb. Due Date") & vbTab<BR>Response.Write ("Disb. Payee") & vbTab<BR>Response.Write ("Rev Code") & vbTab<BR>Response.Write vbnewline<BR> <BR>&#039;gets the data<BR>do while not objrs.eof<BR> For iFields = 0 To objrs.Fields.Count -1<BR> Response.Write (TRIM(objrs.Fields(iFields).Value)) & vbTab<BR> Next<BR> Response.Write vbnewline<BR>objrs.movenext<BR>loop<BR>Response.En d<BR><BR>Is there anything I can do to make sure this opens in notepad and NOT the browser....<BR><BR>thanks for your help

  2. #2
    Join Date
    Dec 1969

    Default Don't think so.

    I think you are stuck with however the user configures their browser to handle the text/plain MIME type.

Posting Permissions

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