Click here to Skip to main content
15,911,139 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi Every one, I have saved pictures in one (Image)folder and these pictures showed on page when I run my asp application form, Now I want when I click on picture this picture increase size I don't know about this, please can some one help me on this topic with code.
Posted

Don't do it that way: instead, keep the full size picture in the folder, and create a thumbnail image which you show on the page. The thumbnail links to the full size image, and the browser will automatically open the full size version for you:
HTML
<a href="http://www.MyDomain.com/images/thumbs/MyPictureName.jpg"><img src="http://www.MyDomain.com/images/MyPictureName.jpg" border="0" alt="Click for full image"></a>
 
Share this answer
 
Comments
Nirav Prabtani 21-Dec-13 6:26am    
agree.. :) :D
Griff answer is right.

HI Try this..
It might help you..
the below code does the toggle operation of two predefined sizes of the images in javascript.
if you dont need toggle, u can modify in the javascript...

XML
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="WebApplication1.WebForm1" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <script src="jquery.js.js"></script>
    <script type="text/javascript">
        var Resize = function (imageobject) {
            if (imageobject.style.height == '50px') {
                imageobject.style.height = '200px';
                imageobject.style.width = '200px';
            }
            else {
                imageobject.style.height = '50px';
                imageobject.style.width = '50px';
            }
        }
    </script>

</head>
<body>
    <form id="form1" runat="server">
        <asp:Image ID="Image1" onclick="Resize(this);" Style="height: 50px; width: 50px;" ImageUrl="~/images/codeproject 2nd.png" runat="server" />
    </form>

</body>
</html>
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900