When I run an asp script, I can view the contents on the screen in pdf format. But instead of displaying the information to the screen, I want to be able to save the same information into a binary file with a pdf extension.
Does anybody know how to do that?
I have listed the coded that writes it to the screen, but now want to be able to write the information into a file ....
I have one EXE file that customer need to download from my website. But I have one text file of Max 250 bytes of text in in that I want to append to the END of the Binary EXE file and give that for download to user. How can I do that. Please suggest. I think we need to go for some BinaryWrite kind of procedure using ADO Stream.
I am having trouble trying to output an image using Binary.Write. I have a page which displays a record. One of the fields is an image and I want to display this on the page.
My question is this: Is it possible to use the Binary write command i.e. Binary.Write("MyDatabaseField") on the same page that I want the image displayed on?
If not Is there a way to nest it inside an image tag as follows:
I'm having problems with a simple binary write. The page is just supposed to write a JPEG back to the browser but the image does not display (the "X" image shows).
Im writing a web interface for a CRM product which has the ability to store files within a database... Now, the problem is, these files are binary files, and VBScript doesn't have support for binary files (as far as i know...)...
To overcome this i wrote a component (ActiveX DLL) in VB6. This component works fine, but as soon as i use it in ASP, my computer beeps and then sits there looking like it's doing something forever...
For a while I am working with ThumbsPlus ( http://www.cerious.com/ ) as manager for pics. The benefit of the program is that it stores all kind of information in a central Microsoft Database that easily can be manipulated. A thumbnail of the picture is also stored in de MDB as long binary (jpeg format)
I made a small script that extracts all kind of information of the MDB by use of queries and ASP. This works perfect for string/numerical information.
I am wondering if I can also write the stored (jpg)thumbnail to the asp file so that I have a preview of my picture.
Can this be done? What is the syntax?
I tried already:
Response.BinaryWrite BinData
Where BinData is the contents of the Thumbnail field. When I take a look at the MDB table in design view, the DataType of this field is "OLE object", if I open the table, the contents of the field displays "long binary data".....
I have an exe file on a server that reads an XML file ( as a parameter) and generates a new file for downloading. However, most servers won't allow an exe file to create the new binary file. Is there any way that I can execute the exe file and have it download straight to the client instead of saving to the server?
I'm using ASP to generate an RTF (rich text) file, via the FSO. No problems with text, but when it comes to inserting images, the files have to be embedded as either binary or hex.
Try as I might, I can't get binary to work (Word b0rks trying to open the resulting file). When I create a simple RTF in Wordpad and then view its source, Wordpad seems to be embedding the image as hex. Does anyone have a suggestion as to how I could read an image file off the disk in hex format for writing into my RTF?
I need to extract some blobs (chm files, actually) from a database and save their contents on the server (recreate chm files).
I tried to do it in several ways (writing the contents to a stream and save the stream to file, writing the contents directly to file, I couldn't figure out how to do it by using the class ADODB.File) but none of them worked.
This works with most every file type I've run across (jpg, gif, doc, ppt, xls, etc..). Normally when the user tries to access a file, a download window pops up asking the user whether he/she wants to open or save the file.
However, when the file is a zip file, the user just receives a blank screen instead of the usual download window. Has any one run into this problem? If yes, how did you resolve it?
i have an ASP (iis v5.0) application that generates a pdf file and this file is saved to the server. it is saved in a location not available to web users. i have an asp script (below) that sends the pdf file to the user as a binary stream. So that the user specifies which file to upload, the script performs some security checking and if it passes, it sends the pdf document.
This works great in HTTP, but i want to do this using SSL. When i try the same thing over SSL, it gives me a 'File Download' dialog box with Open, Save, Cancel, More Info. The file name is the name of my script and file type is 'Adobe Acrobat Control for ActiveX'.
When i click Save or Open i get an error message: Internet Explorer cannot download [scriptname] IE was not able to open this Internet site. The requested site is either unavailable or cannot be found. Please try again later.
The key to all this is that the report can change and i need to make sure the data doesn't get cached along the way. Hence there are a bunch of header manipulation commands included in the send function. Code:
I'm trying to setup an ASP page to POST an image across to another page- essentially simulating what a browser does when you use <input type=file> in a HTML form.
I'm able to correctly setup the headers etc and do the POST, but I'm unable to include the binary data of the image.
The only way i've been able to do it is if I base64 encode the image. I'm using MSXML2.ServerXMLHTTP to do the POST, and I can't seem to do the .send with a form body that includes the binary data of the image. Code:
I want to write few lines to one file called log.txt. This log.txt is located in one directory called log.dir This log.dir is located in webroot (mysite.com/log.dir/) I protected this directory using password protection from my hoting control panel. So if I want to see log.txt file using browser, I have to enter username and password. It works fine.
I have a asp file in webroot called my.asp This file writes some text in log.txt file. I tested this using firefox browser. All worked fine. You may wonder, where is the problem then? The problem is Internet Explorer. When I tested my.asp file using IE, it asks for username and password to proceed further. I want to avoid this.
How can I write to a file located in password protected directory that will work with IE? I know it look stupid. ASP work on server side so it should work with IE if it works with FireFox. But trust me, it's not working .
Im getting a error when trying to write to a txt file.Its so annoying i got it working on my test server and then moved it to another server and it gives this error i think it could be perrmisions but ive gave the folder read write permisions.
Using the HttpRequest object to gather material (potentially from an external server), is it possible to write the response stream into which ever file type is required e.g. I request not just text, but an image - is is possible to write the image to file? Or is this just not possible? I can only find reference to create a text file.
I'm having trouble translating a script that I wrote in php to asp. Well a line any how.
$fp = fopen("/mydomain/logs/mail.log", "a+") or die("Could Not Write Form Data To File.");
fputs ($fp, $info_from_form);
fclose($fp);
basically, the above line does is:- opens the file mail.log and writes to the content of that file. the "a+" means that if the file is not there then it will create "mail.log" and write to it.
The process was included in a form to email php script.
Client said "Yea, our current host does PHP and all that" and of course they don't. I know PHP, so hopefully it is somewhat similar to ASP. Anyway...I want to know how to take information from an HTML form and write the info to a text file. It is going to be *very* basic as I only need to write one line to the text file.
It is just so the client can type in the monthly loan rate, or something like that, and save that info to a text file. Then, show the text file on all the pages.
how can a make a select to a database and then stored the results into an excel datasshet using vbscript. I already know how to connect to the database and make the query.
if it's possible to save a file down to someone's C drive from an ASP page. I've left him fiddling around with the FileSystem object and TexStream object, but I don't fancy his chances.
I'm guessing this may not be possible, as people may not be overly happy with the concept of web pages writing files to their machines, but I thought I'd ask. And it's on an intranet if that helps.
I have written to text files in the past, but always appending new data to the end of the text file. I now want to add the new data to the beginning of the file. The text file would be a record of orders placed through a web form. The text file would merely be a record of the orders but it needs to be in descending date order - each new record added to the beginning.
response.write("<a href=""editprofile.asp"" class=""default"">Edit Profile</a> / <a href=""viewprofile.asp"" class=""default"">View Profile</a> / <a href=""mymessages.asp"" class=""default"">My Messages</a>") how do i put: <!--#include file="noofmessages.asp" --> at the end of my code in the last link My Messages?
I am working on a safetywear deduction system and i need to perform the following functions: write to a text file and read from a test file and wrute to a table in the database. I need code to write and read to a text file in asp please.
I have an ASP application on IIS server: http://localhost/myApp I use ASP and a my own VB activex DLL to create a pdf file and write this file to a subfolder of the Application folder: http://localhost/myApp/pdfs
1- Over IIS I have set the "write permission" for this subfolder. But each time I receive the message: "Can't open output file (bad filename, in use by other application)", error 0x80040202
2- a visual basic test application can call this DLL, generate and write the file without problem to the folder
3- with ASP I generate the file in a normal folder (ie c: emp), it works Then my ASP page use FileSystemObject to copy this file to the folder ...MyApp/pdfs
When I call this page there is no error message, but the programm runs utils the line, where FileSystemObject to copy the file to the folder, then it stops there. The process is hung (dead). The file is not copied...
how can i read the datas in specific columns and rows from excel(.csv) file and then use that datas to calculate the min(example) and write the results into the same excel(.csv) file.
I want to make a log file in which only a date and time are written, when a certain page is visited.
Most scripts and tutorials explain only about how to read a file, and how to write a file.. not on how to write a line at the end of a file(or beginning). I tried the following, but this does not work: Code: