none
Storing image in Database

    Question

  • Hi,

    I need to display image in treeview for that I am currently storing the images in clientbin folder. But while reading the image I need to get the list of images available inside the folder. I don't know how to get all the file names during runtime.

    More than that some people suggested to go with IsolatedStorage by storing image in the database.

    Is there any other method to store and display the images during runtime?

     Please help me!

     

     

    Monday, May 04, 2009 9:31 AM

Answers

  • using ASP.NET you can enumerate the files in the ClientBin using System.IO classes. Then you can return this data to the plugin using a web service or an xml file and from the code you can download the images and store them in the IsolatedStorage.

    This if I really understood your problem.

    HTH

    Monday, May 04, 2009 4:45 PM
  • You have to activate asp.net compatibility if you are using a WCF service. Simply put this attibute on top of the class implementing the service:

    [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Required)]

    you can use also

    AspNetCompatibilityRequirementsMode.Allowed

    To get the physical path of the ClientBin the simplest way is using

    string path = HostingEnvironment.MapPath("~/ClientBin") 

    HTH

    Thursday, May 07, 2009 3:19 AM

All replies

  • using ASP.NET you can enumerate the files in the ClientBin using System.IO classes. Then you can return this data to the plugin using a web service or an xml file and from the code you can download the images and store them in the IsolatedStorage.

    This if I really understood your problem.

    HTH

    Monday, May 04, 2009 4:45 PM
  •  How to access the clientbin folder using a webservice or WCF service. I tried to access using

     string url=HttpContext.Current.Request.Url.AbsoluteUri;

    but it shows null reference error.

    Thursday, May 07, 2009 2:52 AM
  • You have to activate asp.net compatibility if you are using a WCF service. Simply put this attibute on top of the class implementing the service:

    [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Required)]

    you can use also

    AspNetCompatibilityRequirementsMode.Allowed

    To get the physical path of the ClientBin the simplest way is using

    string path = HostingEnvironment.MapPath("~/ClientBin") 

    HTH

    Thursday, May 07, 2009 3:19 AM