Hi Alonso, I've just gone in and recreated the scenario in Kentico 10. When I look at the value stored by a Media seletor form control, I see something like this:
~/Blank/media/sample-images/Apples.jpg?ext=.jpg, which for me I can browse without the
~ character. It's a little odd that you cannot, I wonder if you have any security permission issues?
I'm only concerning myself with the current document in my web part, so I have a public property:
public string NewsMediaImage => CurrentDocument.GetValue("NewsMedia").ToString();
And then in my markup, I'm just using:
<img src="<%=NewsMediaImage %>" />
That gives me the relative URL, to get the absolute, I can do something like this to my property:
public string NewsMediaImage => URLHelper.GetAbsoluteUrl(URLHelper.ResolveUrl(CurrentDocument.GetValue("NewsMedia").ToString()));
so that I get a URL more like this:
So in summary, try out
CMS.Helpers.URLHelper to resolve to the absolute.