Displaying Pictures From An ASP File

Tips >> ASP

WANTS TO MAKE SOFTWARE WITHOUT KNOWLEDGE OF ASP? CLICK HERE

We are trying this tutorial to be simple, so in this page we will request to go and see for short and sweet examples. These page will explain you how to display pictures from an ASP file. It can be better explained as stated below here in these page.

The following are short few steps how to display pictures from an ASP file :-

Example#1 :-

  • Open Your page :-
    Open your asp file that will display the changed sieze image.

  • Edit the area where you want to show the image :-
    This is going to be a little complicated for the first time, but you'll become used to of it.
    1. Click on Insert Image.
    2. Select Data Source.
    3. Open up the Recordset by clicking the + sign.
    4. Select the appropriate field that you saved the images into.
    5. These step is very Important. This next step is ONLY necessary if you DID NOT save the image with the full path in the database!
    In URL section enter the name of the upload folder that your images are. Right at the beginning.


  • Click OK

  • Save the file in your site

    You will need to save the file in your site. Check it out!

 

It can also be explained as :-

Example#2 :-

showpicture.html  
<html>
<title>My picture</title>
<body>

<img src=mypicture.asp>

</body>
</html>
1
2
3
4
5
6
7
8
mypicture.asp  
<% response.ContentType ="image/GIF" %>
<!--#include virtual="mypicture.gif" -->
1
2

Output :-

  • In the first file (showpicture.html) we have include in the html code the source for our picture ("mypicture.asp", instead of "mypicture.gif").
  • In the response page, first we have indicated whith kind of Content Type we are sending to the client (this time "image/GIF", and then by using "include/virtual" the file is send (in this case all files are in the same directory)

 

Note :- By using "NOSAVE" code in our page, the client will not save the picture in the cache of the computer. It may be a problem for us: let´s suppose we have include this the same code in several pages within our site. Each time we visit a new page, session ("linkto") will be defined again, but in case the visitor clicks the back bottom of the browser and the picture show is the same one it was shown in our previous visit, when clicking the visitor will be redirect to a non-correct URL.

 

 
E-mail : sales@virtualsplat.com
Phone : +91-9892413501

Whatsapp Icon +91-9967648641

Whatsapp Icon +91-9967648641