Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
180
node image in server side...
posted

Hi,

 System.Drawing.Image treeImage = GenerateIcon(); //some function to generate an icon

LIke this im generating an image. I want to add this image to the node in the server side. How can i do this in the server side.

In the ultratreenode we have the option of newnode.LeftImages[0]=treeImage , which accepts the images directly.

In web, we have newnode.ImageUrl , that accepts the location of the image. how can i assign this image directly.

 

Parents
  • 28464
    posted

    Hello,

    UltraWebTree (similar to all ASP.NET server controls) does not work directly with resources like binary streams, bitmap images in memory, etc. This is more typical for desktop applications and Winforms / WPF controls, but for ASP.NET and the web in general, the Image is typically just a string pointing to the file location (actual file path).

    So the suggestion above is spot on. In your particular case, if you have a stream of binary data that represents the image, just make sure you save it to a file location first and then use the string file path for the ImageUrl property of the node.

Reply Children
No Data