SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Member
    Join Date
    Mar 2004
    Location
    India
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    converting an asp page to a file

    hi,
    i want to convert my asp page into a file format(.txt or .doc). is that possible. (ie), when i display the results in a asp page, i've 2 options, one to print and other to convert to a file. how to print thru asp code and how to convert to a file.
    Please help me.

  2. #2
    SitePoint Addict
    Join Date
    Dec 2002
    Location
    Gent, Belgium, Europe, World, Univers
    Posts
    397
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes it is possible.

    The FileSystemObject will allow you to do so.

    http://msdn.microsoft.com/library/de...stemobject.htm

  3. #3
    The doctor is in... silver trophy MarcusJT's Avatar
    Join Date
    Jan 2002
    Location
    London
    Posts
    3,509
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    See here for a technique which allows you to output HTML and open it in Word:
    http://msdn.microsoft.com/library/de...ng10162000.asp

    With regard to printing, where do you want the printing to happen? At the server end, or the client (i.e. browser) end?
    MarcusJT
    - former ASP web developer / former SPF "ASP Guru"
    - *very* old blog with some useful ASP code

    - Please think, Google, and search these forums before posting!

  4. #4
    SitePoint Member
    Join Date
    Mar 2004
    Location
    India
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thank u,
    the links are really helpful. but, in the first link, it is abt creating a file and writing contents into it but it is not abt converting an asp page contents to a file.
    i want to print it on the client end as a report.

  5. #5
    The doctor is in... silver trophy MarcusJT's Avatar
    Join Date
    Jan 2002
    Location
    London
    Posts
    3,509
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Users can print any web page that they want simply by using the browser's print function. If you want to trigger this automatically or provide a button to do this on the page itself, then see here:
    http://www.dynamicdrive.com/dynamicindex9/other1.htm

    PS - kajakske's link didn't seem at all relevant to your problem, which is why I provided one which was.
    MarcusJT
    - former ASP web developer / former SPF "ASP Guru"
    - *very* old blog with some useful ASP code

    - Please think, Google, and search these forums before posting!

  6. #6
    SitePoint Member
    Join Date
    Mar 2004
    Location
    India
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    oh thanks a lot M@rco, it is really helpful for me and u've given a link with the complete coding. thank u very much.


Bookmarks

Posting Permissions

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