Serious problem inside
-
sir i m using datalist control. In database having two types of images portrate size and landscape size . The pictures are coming from database dynamically. The problem is that when the pictures are coming in datalist they all having same size and width because height and widht of datalist is fixed if i take datalist without ant size if the picture size is 700*500 pixel it appear in whole page and when i take datalist with a fixed size User cannot identify the pictures are landscape or portrait size.so please sand me some solution or code sir i have to change size of images on runtime how can i add javascript code in this problem Please send me full code Thank YOU -- modified at 0:53 Wednesday 17th May, 2006
-
sir i m using datalist control. In database having two types of images portrate size and landscape size . The pictures are coming from database dynamically. The problem is that when the pictures are coming in datalist they all having same size and width because height and widht of datalist is fixed if i take datalist without ant size if the picture size is 700*500 pixel it appear in whole page and when i take datalist with a fixed size User cannot identify the pictures are landscape or portrait size.so please sand me some solution or code sir i have to change size of images on runtime how can i add javascript code in this problem Please send me full code Thank YOU -- modified at 0:53 Wednesday 17th May, 2006
Don't set a width or height for the image tag. This will allow it to grow to the size of the actual image. TMF
-
Don't set a width or height for the image tag. This will allow it to grow to the size of the actual image. TMF
sir try to understand me if i am not specify height and width suppose if the image size is 700*500 pixel it will appear in whole page. Sir i have to show small type images like thumbnail in datalist so i fixed the size of column of datalist . i have only two types of images portrait and landscape type. i have to show these images in datalist but when these images are appear in datalist they all having same size the user cannot specify that whether the image is portrait or landscape I have to change the size of images at runtime.so the user can easily identify that what type of image is this. please send me some code
-
sir try to understand me if i am not specify height and width suppose if the image size is 700*500 pixel it will appear in whole page. Sir i have to show small type images like thumbnail in datalist so i fixed the size of column of datalist . i have only two types of images portrait and landscape type. i have to show these images in datalist but when these images are appear in datalist they all having same size the user cannot specify that whether the image is portrait or landscape I have to change the size of images at runtime.so the user can easily identify that what type of image is this. please send me some code
Hi, If you know that which image's size you have to change then you can change the size and other properties od the control in the OnItemdatabound event of the datalist.First you have to find the control and then set width and height of that. Best Regards, Apurva Kaushal
-
Hi, If you know that which image's size you have to change then you can change the size and other properties od the control in the OnItemdatabound event of the datalist.First you have to find the control and then set width and height of that. Best Regards, Apurva Kaushal
The easiest would be to write a page or a HttpHandler that return the image as a thumbnail for you. When you create the thumbnail you can use the original image's size and generate a thumbnail at a specified percentage of the size. Search google for "Generating thumbnails on the fly" Here is the basic mechanics for you: In VB :sigh: (I hate the days I have to do VB, but here is some code I did)
Dim filename As String = Request("file") Dim img, tmb As System.Drawing.Image img = img.FromFile(Server.MapPath(filename)) tmb = img.GetThumbnailImage(img.Width * 0.5, img.Height * 0.5, Nothing, System.IntPtr.Zero) Response.Clear() Response.ContentType = "image/jpeg" tmb.Save(Response.OutputStream, System.Drawing.Imaging.ImageFormat.Jpeg) Response.End() img = Nothing tmb = Nothing img.Dispose() tmb.Dispose()
TMF -- modified at 8:09 Tuesday 16th May, 2006