Skip to Content
0
Former Member
Oct 13, 2005 at 03:24 PM

Get ABSOLUTE path to file?

193 Views

Hi there,

Forgive the "stupid question" (I actually do BSP Portal development work mainly 😉) but how can I read a properties file or resource (image etc) from the .NET Portal environment?

I mean if I wanted to read properties in Java I would do something like:

IPortalComponentProfile profile = request.getComponentContext.getProfile();

response.write (profile.getProperty("myProperty"));

What do I do in .NET?

In my particlar instance I would like to create a copy of an "Excel Template" that I will deploy withe the .NET PAR file....so I have code like the following:

Dim filePath As String = MapResourcePath("Web Resources/template/Template.xls")

This returns something like:

/irj/portalapps/myapp/template/Template.xls

How can I get the ABSOLUTE path to this file?

Also how can I attach a properties file to the .NET Portal application and easily read them in?

Thanks alot for the help, much appreciated!

Regards

Lynton