Bonjour.
Voici mon code:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29 <% Dim strFilename 'Save the current chart to a GIF file with a temporary' 'filename using the FSO' set fso = Server.CreateObject("Scripting.FileSystemObject") strFileName = Server.MapPath(".") & "\" & fso.GetTempName()+".gif" objCSpace.ExportPicture strFileName, "gif", 800, 400 'Use On Error Resume Next to make sure we eventually delete' 'the temporary GIF file even if something fails in the next' 'couple of functions' on error resume next 'The GIF file has been created. Return the contents of the' 'GIF file as binary data using the BinaryFileStream COM object' set objBinaryFile = Server.CreateObject("BinaryFileStream.Object") Response.BinaryWrite objBinaryFile.GetFileBytes(CStr(strFileName)) 'Delete the GIF file since it is no longer needed' objBinaryFile.DeleteFile CStr(sFullFileName) 'clear variables' set objBinaryFile = nothing set FSO = nothing set objCSpace = nothing %>
Il me crée un fichier tmp avec un nom au hasard.J'ai rajouté
et il me le met en GIF.
Code : Sélectionner tout - Visualiser dans une fenêtre à part +".gif"
Seulement je voudrais choisir le nom.
Est-ce possible? Je ne veux pas utiliser
Comme çà mon gif à toujours le même nom pour moi l'afficher dans ma page asp.
Code : Sélectionner tout - Visualiser dans une fenêtre à part fso.GetTempName()
Je sais pas is je suis clair
![]()
Merci d'avance![]()
Partager