Programatically get 14 hive path in sharepoint 2010 -
i need 14 hive path using code in c#.net.
can 1 tell me how can this?
you can access physical path using sputility
- web path looking @ spweb
object.
using sputility
setuppath of sharepoint so:
using microsoft.sharepoint.utilities; string spsetuppath = sputility.getgenericsetuppath(string.empty); //e.g. returns "c:\program files\common files\microsoft shared\web server extensions\14
- msdn documentation sputility.getgenericsetuppath
- example usages of sputility.getgenericsetuppath (e.g. getting templates dir)
or can use spweb's server relative url method:
using microsoft.sharepoint; string spserverurl = spweb.serverrelativeurl;
Comments
Post a Comment