NEED ADDITIONAL CODING FOR INSERTING IMAGE

Last post 09-18-2009 1:44 PM by nijhawan.saurabh. 9 replies.

Sort Posts:

  • NEED ADDITIONAL CODING FOR INSERTING IMAGE

    08-16-2009, 2:31 AM
    • Member
      4 point Member
    • vellore.balaji
    • Member since 11-03-2008, 2:25 PM
    • Chennai
    • Posts 15

    hello devopers .,

    i m new to asp.net .... i  facing diffculty in showing saved image (from database) to mediul small large image . ,

    i gone thru this web site .. its awesome coding ., picture are dispalyed in mediul small large image..

    can u provide me the coding to save the image in

    bytes original

    bytes thumb

    bytes poster

    bytes full .,

    these are the database table elements to save the photo . ,

    there is no insert coding for this .,

    i need the insert coding , for this  why they used three field to store the single image

    i have normal image saving code ....  

    plz provide me the coding for this


    balaji...
    working as a Web Developer... in ASP.net Field
  • Re: NEED ADDITIONAL CODING FOR INSERTING IMAGE

    08-16-2009, 4:42 AM

    Hi,

    What you do is maintain a Thumbnail folder and a Image folder in your website root directory.

    Now store the imagename.extention as text in the database.

    Make sure the names of both, the thumbnail image and large image are same.

    Now when you want to show the image, you just need to bind the foldername+imagename to the <asp:Image control.


    Saurabh Nijhawan(B.Tech. CSE,GGSIPU,New Delhi)
    Application Architect, Eminent Solutions, New Delhi.
    Freelancer | Teacher
    Remember to click "Mark as Answer" on the post, if it helped you.
    ASP.NET Weblog
    http://www.saurabhnijhawan.com
    Learning Made Easy


  • Re: NEED ADDITIONAL CODING FOR INSERTING IMAGE

    08-16-2009, 1:25 PM
    • Member
      4 point Member
    • vellore.balaji
    • Member since 11-03-2008, 2:25 PM
    • Chennai
    • Posts 15

    hi okay ., its nice .,


    if i have the two different image with the same Name ...

    then if i select the image using your method ., i hope it will result in false answer ...


    inorder to overcome this i m going to store the image(thumbnalied,fullimage) directly to the sqlserver database ...




    balaji...
    working as a Web Developer... in ASP.net Field
  • Re: NEED ADDITIONAL CODING FOR INSERTING IMAGE

    08-16-2009, 1:46 PM

    Hi,

    In that case what you can do is to have two fields in your database, one for storing the thumbnail image path.

    Another field for storing the larger image path.

    This way even if the paths for thumbnail and larger images are different , you can still succeed to fetch them.

    Is this fine now?

    Saurabh Nijhawan(B.Tech. CSE,GGSIPU,New Delhi)
    Application Architect, Eminent Solutions, New Delhi.
    Freelancer | Teacher
    Remember to click "Mark as Answer" on the post, if it helped you.
    ASP.NET Weblog
    http://www.saurabhnijhawan.com
    Learning Made Easy


  • Re: NEED ADDITIONAL CODING FOR INSERTING IMAGE

    08-16-2009, 2:53 PM
    • Member
      4 point Member
    • vellore.balaji
    • Member since 11-03-2008, 2:25 PM
    • Chennai
    • Posts 15

    asper your concept i stored my image*( image1.jpg)in 1st folder category 1

    same way i stored another image named image1.jpg in the 1st  folder category 2

    i m stored the image path in my database .,


    if i retrive category 1 image .,


    then what image will come ??? ???


    think and giveme the solution (rember i have saved two images with same name image1.jpg)



    balaji...
    working as a Web Developer... in ASP.net Field
  • Re: NEED ADDITIONAL CODING FOR INSERTING IMAGE

    08-17-2009, 1:09 AM

    Hi,

    How can you store two images by same name,, in same folder.

    They got to be in different folders.

    What problem are you facing, even if the names are same.

    Make two folders one for thumbnails another for larger images.

    And get the images.

    Saurabh Nijhawan(B.Tech. CSE,GGSIPU,New Delhi)
    Application Architect, Eminent Solutions, New Delhi.
    Freelancer | Teacher
    Remember to click "Mark as Answer" on the post, if it helped you.
    ASP.NET Weblog
    http://www.saurabhnijhawan.com
    Learning Made Easy


  • Re: NEED ADDITIONAL CODING FOR INSERTING IMAGE

    08-19-2009, 7:00 AM
    • Member
      204 point Member
    • gep13
    • Member since 04-11-2006, 12:02 PM
    • Posts 58

    Hello,

    I can understand the desire to store different versions (sizes) of the images, I had the same idea originally, but I decided that this was just going to take up space on the file system, or in the database, that simply wasn't needed.

    The whole premise of the Personal Site Starter Kit is to just have one version of the image, and then resize it as required.

    Gary

  • Re: NEED ADDITIONAL CODING FOR INSERTING IMAGE

    08-28-2009, 7:47 AM

    vellore.balaji:

    asper your concept i stored my image*( image1.jpg)in 1st folder category 1

    same way i stored another image named image1.jpg in the 1st  folder category 2

    i m stored the image path in my database .,


    if i retrive category 1 image .,


    then what image will come ??? ???


    think and giveme the solution (rember i have saved two images with same name image1.jpg)




    Hi Vellore,

    I know you have two images by same name but different folders.

    That wouldn't conflict with the work you want to do.

    Have you tried creating two folders and having images's path store in the databae? 

    Saurabh Nijhawan(B.Tech. CSE,GGSIPU,New Delhi)
    Application Architect, Eminent Solutions, New Delhi.
    Freelancer | Teacher
    Remember to click "Mark as Answer" on the post, if it helped you.
    ASP.NET Weblog
    http://www.saurabhnijhawan.com
    Learning Made Easy


  • Re: NEED ADDITIONAL CODING FOR INSERTING IMAGE

    09-18-2009, 1:26 PM
    • Member
      4 point Member
    • vellore.balaji
    • Member since 11-03-2008, 2:25 PM
    • Chennai
    • Posts 15

    hi your post is useful .. ,

     i have to store PDF or  word in folder ..... 

    then

    in grid i have one column like pdf name in hyperlink .... if i click the hyper link the corresponding pdf file should be open or saved


    can u give me the coding ( storing & display in grid
    )for this ...

    balaji...
    working as a Web Developer... in ASP.net Field
  • Re: NEED ADDITIONAL CODING FOR INSERTING IMAGE

    09-18-2009, 1:44 PM

    Hi,

    This is quiet simple to implement.

    Store the pdf's path in the database.

    Bind it to the Hyperlink's NavigateURL property.

    Now when you would click on the hyperlink, the file would open.

    Here you  would define the sldatasource , get the hyperlink value to the pdf, now just bind it to the hyperlink's navigateurl property using the Eval function.


    If the above posts about Image Files were helpful, please mark them as answers.

    Saurabh Nijhawan(B.Tech. CSE,GGSIPU,New Delhi)
    Application Architect, Eminent Solutions, New Delhi.
    Freelancer | Teacher
    Remember to click "Mark as Answer" on the post, if it helped you.
    ASP.NET Weblog
    http://www.saurabhnijhawan.com
    Learning Made Easy


Page 1 of 1 (10 items)