Wednesday, June 1, 2005

Getting the virtual URL of a SharePoint web app script

Request.Url doesn't give you what it says on the browser Url box. You need to use the following:

string scriptUrl = Request.ServerVariables["HTTP_VTI_SCRIPT_NAME"];

No comments:

 
Jeffrey Ting Jeffrey Ting on Facebook Jeffrey Ting on Spock Jeffrey Ting on Plaxo Jeffrey Ting on Spoke Jeffrey Ting on LinkedIn