|
This will be of good help, Thanks.
Philip Patrick wrote:
About links.... I'll look when I'll get home, maybe I still have links to some site about e-commerce
Will wait for it, when u r back from home
I was born intelligent Education ruined me!.
|
|
|
|
|
Was looking but haven't found, looks like I have deleted them already sorry
Philip Patrick
Web-site: www.stpworks.com
"Two beer or not two beer?" Shakesbeer
|
|
|
|
|
No probs....
I was born intelligent Education ruined me!.
|
|
|
|
|
I'm looking for info on how to make any file (.pdf, .jpg, .doc, .anything) forced as a download even if the browser (mainly IE) thinks it knows what to do with that kind of file.
For example:
I have a series of links, I want the user to only have to left click to initiate the download. If they click on a .jpg file it will try to open it in the browser and just show the image. I want it to prompt a user for downoad regarless of file type.
I am using ASP to develop this project currently.
TIA,
Wally Atkins Newport News, VA, USA
|
|
|
|
|
Pretty simple actually ...
'Buffer the response
Response.Buffer = True
'Create a Stream object
Const adTypeBinary = 1
Set adoStream = Server.CreateObject("ADODB.Stream")
adoStream.Open
adoStream.Type = adTypeBinary
adoStream.LoadFromFile "c:\mypic.jpg" 'Need absolute path to file
'Prepare the header information
Response.AddHeader "Content-Disposition", "attachment; filename=mypic.jpg"
Response.AddHeader "Content-Length", "1024" 'You can get this dynamically using FileSystemObject
Response.Charset = "UTF-8"
Response.ContentType = "image/jpeg" 'There are different possibilities here too
'Send the data
Response.BinaryWrite objStream.Read
'Flush the response
Response.Flush
'Clean up
objStream.Close
Set objStream = Nothing
Wally Atkins Newport News, VA, USA
|
|
|
|
|
I found a code that goes a little further...
no only does it force the download...but it allows you to list all the files in a specified (or dynamically generated) path, but it lets you select the file that you want to download, sort the files but type, name or weight.
Go to the page that explains it all
see ya...
Jon
GET TO KNOW ME
|
|
|
|
|
Hi all:
I hav problems when I try to connect to a Exchange Server with MAPI. The situation is as follows:
I have Exchnage Server in one machine and the ASP.NET application that access it in another machine. In order to logon I use this:
oSession.Logon(strUser, strPassword, False, True, 0, True, strProfileInfo)
and it connects. But when I try to access to any resource in the exchange (the inbox, for example) the next error appears:
"The information store could not be opened. [MAPI 1.0 - [MAPI_E_LOGON_FAILED(80040111)]]"
I think this is because access restrictions or something like that. Anyone has an idea of what is happening?
What is the best way to work against Exchange with this architecture (Exchange Server in one machine and ASP.NET application in another?
Any help will be apreciated.
Cheers,
Ivan
|
|
|
|
|
... answer.
Anybody know of any good online references or downloadable references for HTML4/DHTML/CSS and so on...
Just annoys me trying to remember every attribute of every tag and every style available. Would be nice to have something I can stick on a zip disk and carry around with me.
Regards,
Brian Dela
Run naked in the snow until you're sweating like a stuck pig and can't seem to catch your breath. When the flu becomes pneumonia, they can cure that with a shot. - Roger Wright
|
|
|
|
|
http://www.brainjar.com/dhtml/domviewer/[^]
A great utility to view the Document Object Model that a browser has for a specific web page. Check it out. Hope fully it will help
Wally Atkins Newport News, VA, USA
|
|
|
|
|
|
Cool, thanks.
Regards,
Brian Dela
Run naked in the snow until you're sweating like a stuck pig and can't seem to catch your breath. When the flu becomes pneumonia, they can cure that with a shot. - Roger Wright
|
|
|
|
|
I have some VB code in a .bas that I want to use in an ASP file, can this be done? And how would I go about doing it - i.e. what do I need to do in the ASP code to use the .bas file?
The code in the .bas is just a few public functions, nothing special - and it's not an ActiveX control.
Dylan
|
|
|
|
|
technically since the .bas file is text you should be able to use a server side include to add the .bas file to an .asp page. Just make sure the code in the bas file is Compatible with VBScript, keeping in mind that vbscript uses late binding and it is not a full VB language implementation.
Mediajuggle - Design House Quality At Freelance Prices
http://www.mediajuggle.com
|
|
|
|
|
Well, to use the file in your asp code, simply add the following line:
<!-- #include file="yourfile.bas" -->
Even though the line is wrapped in an HTML comment tag, the ASP interpreter will recognize it, and include the file. That being said, the code in your .bas file has to be VBScript code, not Visual Basic code. I.E., change all CreateObject lines to Server.CreateObject, remove any type declarations (since all types in VBScript have to be Variants ), etc.
Kyosa Jamie Nordmeyer - Cho Dan
Portland, Oregon, USA
|
|
|
|
|
Hi,
Does anybody know how I can read the registry on the server using ASP?
Thanks in advance
Anthony
|
|
|
|
|
Use a Com component installed on the server. You can either make your own using VB or download one off the web. Do a search on google.
Mediajuggle - Design House Quality At Freelance Prices
http://www.mediajuggle.com
|
|
|
|
|
Thanks
That works, or I found that you can use the Windows Scripting Host as well.
Anthony
|
|
|
|
|
I would like to display a complied html help file (*.chm) in a "normal" browser window, without having to start the hh.exe.The chm file is in the same dir as the normal (index)html.
I know this is probably a very stupid question, but coming from a C/C++ world, html etc. is double dutch to me
Thanks in advance
Phil
bum... and I thought I´d got rid of all the bugs
|
|
|
|
|
Unfortunately, .chm files are proprietary file formats and require dedicated software components to be "played".
Actually, other than relying on the de facto hh player, you need to insert an ActiveX object in an html page so IE can play it. Unfortunately, the only html help related ActiveX installed by the html help run-time is hhctrl.ocx, and it's not insertable. Besides that, the starting API is not there. Read : it cannot be used like the Flash player for instance.
May be the html help center[^] has a solution for you.
|
|
|
|
|
Hello,
I want to use Crystal Reports with ASP. I do not want to show the reports to the user. Instead the report should be directly printed on the printer.
When a button is clicked on the screen, number of Reports should be made with each one taking different parameters. The layout of each file is ready. Besides I do not have Crystal Reports installed on my server. The client has given me the ready .rpt files.
Can anybody help in this urgently?
Thanks
Hitesh Kapadia
|
|
|
|
|
HI
Iam using hhctrl.ocx control to close the main window and opens the another window
the code is follows like this :
<object id="closes" type="application/x-oleobject" classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11" viewastext="">
<param name="Command" value="Close" />
function openwin() {
splashWin = window.open("Login.aspx" , "LogonOn", "resizable=no,toolbar=no,location=no,status=yes,menubar=no,scrollbars=no,width=326,height=210")
window.focus();
closes.Click()
}
function shutdown(){
window.focus();
closes.Click();
}
this above code works perfectly with IE 5.5v
,but the same is not working with IE 6.0.The error that iam receiving is "This operation can only function within HTML help"
Do i need to install any latest version of hhctrl.ocx control,which might solve this problem? any suggestions please?
Thx
Praveen
Praveen
Chennai
|
|
|
|
|
Hi,
I am a C++ programmer and am trying to learn Pearl. Recently I discorved that CGI scripts can also be written in C++ and being as I am much better at that I would like to write my scripts in C++. I am confused on some issues though:
1) Do I compile the program (EXE) upload it to the server and chmod it
2) Do I just upload the code (cpp) and chmod it to 755
3) Is QUERY_STRING analogous to argv or argc
In general you can see that I am clueless about the topic. Any help (especially useful links) would be much appreciated on the topic. Thanks.
P.S. Can C++ do what the Perl scripts all over the internet do (eg. HTML on the fly, reading and processing forms?
|
|
|
|
|
The CGI program must be executable, so C++ source won't work. If the server runs some Unix-style OS (you mention chmod 755) , an .EXE compiled in Windows won't work either. You must compile the program on the server. QUERY_STRING is passed as an environment variable, you access it with the getenv() function.
See the CGI primer
The GNU cgicc class library may be useful.
|
|
|
|
|
Thanks a lot for the help and the links.
|
|
|
|
|
Thanks again for your help, I finally got a basic script running, just some printing to the screen but there is one thing. I can't get it to compile if I use cout, I cant use ofstream and things of the sort. The C equivelents work fine. Does this mean I can forget about c++ on my server and need to stick with c or I am using my includes wrong... Here is what I use to compile:
gcc -o cgitest.cgi cgitest.cpp
and here are the error codes in my telnet client:
/tmp/cccJ3yII.o: In function `main':
/tmp/cccJ3yII.o(.text+0x16): undefined reference to `ofstream::ofstream(int)'/tmp/cccJ3yII.o(.text+0x4b): undefined reference to `ofstream::open(char const *, int, int)'
/tmp/cccJ3yII.o(.text+0x68): undefined reference to `ostream::operator<<(char const *)'
/tmp/cccJ3yII.o(.text+0x7a): undefined reference to `fstreambase::close(void)'
/tmp/cccJ3yII.o(.text+0x104): undefined reference to `ofstream::~ofstream(void)'
/tmp/cccJ3yII.o(.text+0x121): undefined reference to `ofstream::~ofstream(void)'
collect2: ld returned 1 exit status
similar ones for cout... I have included iostream and fstream like so:
<br />
#include iostream.h<br />
#include fstream.h<br />
(with the brackets around by I can't get the files to appear due to HTML!)
but still no luck (compiles fine on my computer). Any ideas?
|
|
|
|