image resize for image button

my home page have a image button that shows (randomally) one of our album pictures.

i want tocreate a smaller image (thumbnail) to be the source for this photo (and i have to use image button, since the users clicking that image...).
i read this article and even down loaded a cotrol that does the work.
but, both article and control (and as much i ubderstood the "getthumbnail" method) creates a image that can stream only for <img src> tag or "image" object. i couldn't find the way to use them as the "imageurl" adress of the image button.
are there is a way to create a thumbnail on the fly (my album have more then 1000 images, and create a thumbnail for all of them is...), and to use it in the imageurl property.
are there is a control that does it?
great thanks...
0
yanivhanya
8/13/2004 11:20:54 AM
asp.net.web-forms 93655 articles. 6 followers. Follow

4 Replies
3410 Views

Similar Articles

[PageSpeed] 37

I do not see any problem in using same url which is used in <img src>


<asp:ImageButton id="ImageButton1" runat="server" ImageUrl="dynamic.aspx?image=image.jpg&width=120"></asp:ImageButton>
or in case of handler
<asp:ImageButton id="ImageButton1" runat="server" ImageUrl="album/image.jpeg?width=120"></asp:ImageButton>

Jigar Desai
-----------------------
Do not forget to "Mark as Answer" on the post that helped you.
0
jigar
8/13/2004 11:57:18 AM
well, the image is not resized... i don't get error picture (the empty squre), but the image is in the same size.

i give the image url in the code behind, do you think it's matter?
0
yanivhanya
8/13/2004 2:10:24 PM
:: well, the image is not resized... i don't get error picture (the empty squre), but the image is in the same size. 

From what you are describing it looks like handler problem either you have not configured IIS correctly(Mapping the .jpg extension on the ASP.NET runtime ISAPI) or you havn't registerd an HTTP Handler in web.config file.
Learn more about Http Handlers HTTP Handlers for Images in ASP.NET
i give the image url in the code behind, do you think it's matter?
No it should not matter.
In fact if handler is not configured properly then <img src> code should also show image of same size.
best way to check if your handler is working type http://yourserver/image.jpg&width=120 in browser and see if its resizing. if this works in browser it will work at all places (<img src>,imagebutton,image server control, and also your code behind)

Jigar Desai
-----------------------
Do not forget to "Mark as Answer" on the post that helped you.
0
jigar
8/13/2004 3:37:42 PM
Here is how to do this.

I have used the code from this article and it works great.

True Image Resizing

0
bkleptz
9/11/2004 11:43:42 PM
Reply:

Similar Artilces:

display image in a image image button
hi   i have to display an image in image button while uploading mycode Image1.ImageUrl = Upload.PostedFile.FileName; is not working thanks Hi You need to save the PostedFile to the disk on the server and then assign it to ImageUrl. Take a look at the following links for more infoprmation on how to do this.  http://www.codeproject.com/KB/aspnet/netimageupload.aspx http://www.stardeveloper.com/articles/display.html?article=2003022601&page=1Reza Nassabehwww.professionalcsharp.comDon't forget to click "Mark as Answer" on the post that helped you. That way ...

Image in image
Hi, I have a project where clients viewing my website can buy t-shirts. They can choose from a number of t-shirt colors and shapes which are their plain colour. They can also choose a number of prints to be placed on the t-shirt. These will be graphics stored in a database. My problem is on how I can displaty the t-shirt with the graphics or logo they chose on te t-shirt. It would be something like drawing text on an image but instead drawing an existing image on the base image. Any Ideas? (I am using visual studio 2005 and vb.NET)   RegardsMerovingian you 1. You can create a...

Image on Image
I am trying to display a page that has image of a map on it. The user can then place other images of red thumbtacks on the image at different locations. Then when these thumb tacks are clicked on, they open a folder of pics related to the area. I saw a method in the imageButton class that returns the (x,y) of the location where the user clicked. I thought I could use this information to place another, smaller image button, on that area. My problem is that i can't seem to get the bottom imageButton to be transparent so I can see the smaller one. Am i on the right track with this. Any advice would be appricated. You can contact me at adamgleiss@gmail.com. Thanks....

how to do moving image, resizing in web form?
How to implement similar like google map - moving image, resizing, reducing size in asp.net? guidence please!   All of this is done through extensve Javascripting on the client-side.  A Google search may be able to steer you in the right direction. Hello sk78, Please refer to Google Maps Control for ASP.NET 2.0 It describes how to build and use an ASP.NET Server Control that makes Google Map integration easy within ASP.NET applications Hope it helps, JessicaJessica CaoSincerely,Microsoft Online Community Support“Please remember to click “Mark as Answer” on the...

image and image
// create an image object, using the filename we just retrieved System.Drawing.Image image = System.Drawing.Image.FromFile(Server.MapPath(file)); // create the actual thumbnail imageSystem.Drawing.Image thumbnailImage = image.GetThumbnailImage(64, 64, new System.Drawing.Image.GetThumbnailImageAbort(ThumbnailCallback), IntPtr.Zero);   now my question is how to display this image in my image1 control in asp.net (version 1.1) the below line of code is not working.  Image1.ImageUrl=thumbnailImage.ToString();Mark As Answer If my reply helped you. Hi, you can save t...

Imaging, but not imaging
We multicasted to 43 machines. Updated the image on the master. Multicasted the updated image to 36 machines. (the other 7 wouldn't join the session for some unknown reason). I visually verified that all 36 were imaging. One of the 8 which didn't rename appears to not even have been imaged. The problems with the previous image were still there. It's as though the machine didn't image even though I saw it take part in the session and the temp bar going across the screen. What the heck's going on here? AlaN As a try, what happens if you boot either to PXE ...

Resize a image in mobile web form.
I am creating a mobile web application using .net 2005. I have used mobile web forms and want to resize a image when I click on the image. I can implement that in ASP.NET web page using a java script, but can't use the same java script in mobile web form. The mobile web form does not support tags in the java script. How will i implement the above requirement.   ...

when the user clicks the image button to show the calendar extender on my web form it submits the whole form instead of showing the calendar??
when the user clicks the image button to show the calendar extender on my web form it submits the whole form instead of just showing the calendar??  I have another button that submits the form. my calendar image button is acting like a submit button also instead of acting like a calendar popout button. Does anybody know how I can set an image button to not submit the form and cause my validations to render. I only want it to pop out the Ajax calendar for the specific textbox?   <ajaxToolkit:CalendarExtender runat="server" TargetControlID="txtDate" CssClass="calendar" Format="MMMM d, yyyy"> </ajaxToolkit:CalendarExtender> <table cellpadding="2" style="width: 392px; left: 46px; position: relative; top: 1px;"> <tr> <td align="left" style="width: 894px; height: 8px" valign="middle"> Date:</td> <td align="right" style="width: 79px; height: 8px" valign="middle"> &nbsp;</td> <td style="width: 113px; height: 8px" align="left"> <asp:TextBox ID="txtDate" runat="server" Width="175px"></asp:TextBox></td> <td alig...

Hide image with button click in web form
I have around three tables in a web form and each tabl has one image each. I have a button just next to Image. This button when clicked will either Hide the image or Show the message...I'm not sure, why this is not working in a Web Form? It works in HTML page....Here is the sample code for JavaScript that i use and also the HTML script for the table and button... function ShowSearchImage() { var visible = newImage.style.display; if ( visible == "" ) { newImage.style.display = "none"; btnShowSearch.value = "Show image"; } if ( visible == "none" )...

button images are fuzzy when naxinizing the web form
Hi all,   When I view a web fom on internet explorer the bitmap images on the butons look fuzzy when I maximize the form.   How can I correct that? thanks Jose  Is the video driver you are using set to large fonts (or large size 120 dpi)? Try switching to the regular video driver. Do you still see the problem? -- Erik ReitanASP.NET User EducationThis posting is provided "AS IS" with no warranties, and confers no rights.    ...

image button does not show images after modifications with bitmap on high indexed images.
 i am using bitmap  to create  a new images from alraedy exisiting images...i am using graphics also to write on images ...but after saving the images to final destination..server control image   does not show images ...can ny body help me out of this ....waiting for urs responses   ^    ^  ( '..!..' ) Sincerely,Mohanish Mahajan.Microsoft Online Community Support“Please remember to click “Mark as Answer” on the post that helps you. This can be beneficial to other community members reading the thread. ” If the server contr...

detect if image button has image
HiI have a detailsview and inside it i have a template field where i have an image button. i would like to detect if the image button have an image or not. if there is no image i would like to hide the field.   <ItemTemplate> <asp:ImageButton ID="ImageButton" runat="server" ImageUrl='<%# Eval("Tpic", "~\pictures\{0}") %>' OnClientClick="return false" style="height: 16px" AlternateText="no pic" /> ...

Displaying image in image button
Yes, I am obviously a loser. I have an image button, and have an image. I put the image in the same directory as the form that i am running, and simplyreferred to the image by its name: imageURL="P107005.JPG" But, the image doesn't show. I also attempted to refer to the image by its hardcoded directory placement, but have proven to be a failure at that, too: imageURL="//localhost/csASPServerControlBasics2_P105/P107005.JPG" Anyone tell me what I am screwing up? ~Mike dude check if using this path is correct. imageURL="//l...

change image button image
hi i want to change image button image when mouse over it or clicked it can any one send me code ? Here is the javascript function:  function roll_over(obj, img_src) { obj.src = img_src; }here is the html code<asp:image runat="server" ID="image1" ImageUrl="image1.gif"></asp:image>here is the page load codeimage1.attributes.add("onmouseover","rollover(this,"image2.gif")image1.attributes.add("onmouseout","rollover(this,"image1.gif")  thanks for help- but its not wor...

Image Button Image Url
Hi , I' m using a Image Button in the Grid View and propulating its image url in the code behind page when some conditions are satisfied, otherwise the iamge is invisible. the image is loaded on my localhost but not on the Test site. It is getting the right URL and the image is present in the folder it is looking for and has all the permisssions to view it. I' m clue less why a small rectangle with a red cross is seen and not the image.Any help would be greatly appreciated. Here is my sample code. Image button in the aspx page. <asp:TemplateField HeaderText="Print&quo...

Image Buttons and Images in Menus
how to creat menu with images and how to put images in button Hi, Try this, <table border=0 cellpadding=0 cellspacing=0 width=400>    <tr>          <td background="imagepath">                           </td>          <td background="imagepath">             &n...

image hover on image buttons
Dear fellows. I want to image hover on mouser over and mouse out on a image button. easiest to do is with CSS a:link; a:visited{ background:#e6e6fa url("image.gif") no-repeat fixed center left; } a:hover{ background:#e6e6fa url("imageHover.gif") no-repeat fixed center left; } did you tried this thing on image butons .. uh no... did it with linkbuttons... :-) and those work fine......

Image Map with image button
Hi All, I want to use image map control with the image button, actually i my project m having an image that is generated at run time based on the database, now i need to make some part of this clickable that are in rectangle form. On click m performing some c# functionality also. Pls help me..........Deepak Nigamdeepak@swiftcybernetics.comhttp://www.swiftcybernetics.complease mark as answer if it helps u. go through this url... http://www.beansoftware.com/ASP.NET-Tutorials/ImageMap-Control.aspx http://quickstarts.asp.net/QuickStartv20/aspnet/doc/ctrlref/standard/imagemap.aspxChinna...

Image not displayed in image button
Hi all, I created a custom web control imagebutton and I had set the  imageurl  for imagebutton. See the code in default.aspx:<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %><%@ Register Assembly="WebControlLibrary1" Namespace="WebControlLibrary1" TagPrefix="cc1" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/199...

VB.NET web form Image control SizeMode
The "PictureBox" control in VB.NET has a property called "SizeMode". This allows you to choose how the image will display in the picture box if it is not the same size as the picturebox. However the "image" control for a VB.NET web form (in an ASP.NET application) does not have such a property, instead all images seem to be set to "StretchImage". I want them to be set to "normal", how can I do this? I thought of building my own user control but this would be silly because there must be a simpler way....

For interrupting.web form Resized by position of the div : if div can't dispaly all (such as only top part , then web form heithten the heght),resize the web form
Web Form Resized by position of the div : if div can't dispaly all (such as only top part , then web form heithten the heght),resize the web form ! Because of my pool English, if you can't see , I will explain more ! ThanksGambler is the real life I guess you mean when form grows it also grow parent div element. This is normal. If you want div to stay fixed size and rather clip the form and maybe show a scrollbar, look at overflow property in CSS.Thanks------------------------------------------------------------This posting is provided "AS IS" with no warranties, and confers no ...

superreview granted: [Bug 53966] [IMGBTN]dragging from image button submits form (input type="image") : [Attachment 152106] fix
David Baron <dbaron@dbaron.org> has granted Robert O'Callahan <roc@ocallahan.org>'s request for superreview: Bug 53966: [IMGBTN]dragging from image button submits form (input type="image") http://bugzilla.mozilla.org/show_bug.cgi?id=53966 Attachment 152106: fix http://bugzilla.mozilla.org/attachment.cgi?id=152106&action=edit ------- Additional Comments from David Baron <dbaron@dbaron.org> I don't know much about this code, but r+sr=dbaron. ...

superreview requested: [Bug 53966] [IMGBTN]dragging from image button submits form (input type="image") : [Attachment 152106] fix
Robert O'Callahan <roc@ocallahan.org> has asked David Baron <dbaron@dbaron.org> for superreview: Bug 53966: [IMGBTN]dragging from image button submits form (input type="image") http://bugzilla.mozilla.org/show_bug.cgi?id=53966 Attachment 152106: fix http://bugzilla.mozilla.org/attachment.cgi?id=152106&action=edit ...

I Want to create a tool box,toolbox contains image button and fileupload.These two buttons can be added at runtime(user can add any number of image button and fileupload button dynamically by click)
I Want to create a tool box,toolbox contains image button and fileupload buttons.These two buttons can be added at runtime(user can add any number of image button and fileupload button dynamically by click).for every image user will browse images using fileuploader and he will add the image to that imagebutton at runtime. how to write server side coding to upload the selected image and to set that image to imagebutton at runtime? is it possible? any other way to do it?  advance thanks ask123: I Want to create a tool box,toolbox contains image button and fileupload b...

Web resources about - image resize for image button - asp.net.web-forms

App Store - iResize
Read reviews, get customer ratings, see screenshots, and learn more about iResize on the App Store. Download iResize and enjoy it on your iPhone, ...

Image resize - YouTube
Shai Avidan, Ariel Shamir. Original and larger version can be found here http://www.faculty.idc.ac.il/arik/IMRet-All.mov Update 2008.10.23 - ...


Postbox adds Retina support on OS X, auto-resizes images
... client with a minor update. Postbox 3.0.10 comes with added support for Retina displays in OS X. The new release also now automatically resizes ...

A YouTube Experiment Resizes the Player Dynamically
... YouTube's "stats for nerds" show the size of the player ("dimensions") and the video resolution: The nice thing is that the player resizes automatically ...

Map resizes each state proportionally to real GDP - Business Insider
... So here's an awesome map from the cost-estimating website Fixr that illustrates the scale of each state's GDP and GDP per capita. It resizes ...

A display that resizes as your face moves? Apple zooms in
A new patent application from Apple describes a display technology that can resize itself depending how close your face is to the device.

Resize windows like a pro in OS X
... OS X 10.7, Apple changed its method for resizing windows. In the Classic Mac OS and through the first six releases of OS X, you had to resize ...

Image Optimizer Resizes Your Images, Speeds Up Your Site
... upload the photo, pick a maximum size desired (for web use, I use 500), and optimize. Here’s a screen shot of a how ImageOptimizer resized ...

PhotoBulk Resizes, Optimizes and (Ugh) Watermarks Your Photos
... the command-line tool ImageMagick and wrap it in various OS X System Services; or you could just spend $10 and […] The post PhotoBulk Resizes, ...

Resources last updated: 2/27/2016 10:16:43 AM