I have .NET(C#) ActiveX contol that was downloaded into IE from some URI, for example http://somehost/controlfolder/mycontrol.dll. That control have to download files from host via relative URI. By URI ‘files/file.ext’ control have to download ‘http://somehost/controlfolder/files/file.ext’.
How my control can know main part of URI to construct from relarive URI full URI?
UPD0: I’m using <object> tag for definition control in native html(without using ASP.NET).
UPD1: Is it possible to know server path without assigning public control property from Javascript?
Here are two ideas:
myControl.RootUrl = window.location.replace (“default.aspx”, “”);
From your aspx (or whatever engine you’re using).
<object codebase=’http://somehost/controlfolder/mycontrol.dll’ …>
<param name=”RootUrl” value=”<% =Request.ApplicationPath + “/controlfolder/” %>”/>
</object>