Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Serious problem inside

Serious problem inside

Scheduled Pinned Locked Moved ASP.NET
javascriptdatabasehelpquestion
5 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    sandeep_thakur
    wrote on last edited by
    #1

    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

    T 1 Reply Last reply
    0
    • S sandeep_thakur

      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

      T Offline
      T Offline
      TheManFran
      wrote on last edited by
      #2

      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

      S 1 Reply Last reply
      0
      • T TheManFran

        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

        S Offline
        S Offline
        sandeep_thakur
        wrote on last edited by
        #3

        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

        _ 1 Reply Last reply
        0
        • S sandeep_thakur

          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

          _ Offline
          _ Offline
          _AK_
          wrote on last edited by
          #4

          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

          T 1 Reply Last reply
          0
          • _ _AK_

            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

            T Offline
            T Offline
            TheManFran
            wrote on last edited by
            #5

            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

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups