Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • vladzebu 59 posts 346 karma points
    Jan 27, 2010 @ 11:37
    vladzebu
    0

    Insert image in Media

    How to insert image in Media from C# code ? 

    Br , Vlad . 

  • anthony hall 222 posts 536 karma points
    Jan 27, 2010 @ 11:39
    anthony hall
    1

    something like this

     

            public static string GetMedia(int mediaId)

            {

                if (mediaId == 0) return "";

     

                Media m = new Media(mediaId);

     

                try

                {

                    return m.getProperty("umbracoFile").Value.ToString();

                }

                catch (Exception ex)

                {

                    LogHelper.Exception(ex);

                    return "";

                }

     

            }

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies