I have an application page, added to a site collection. I open the page by the url: http://servername/sitecollection/_layout/sc/page.aspx
I have added some links, which should open the SAME Url with an additional query string. But it doesn't work. I've tried alot of methods, but all the links routes me to http://servername/_layout/sc/page.aspx.
So how can I programmaticly find the right url?
I've tried Http.Context, Request and so on, but one works. :\
So does anyone have an Idea?
Best Regards
Jan
PS: My system is SP2010 Standard Edition Service Pack 2.
Edit:
Here are some of the Methods I have tried:
return SPContext.Current.Site.MakeFullUrl(SPContext.Current.Web.ServerRelativeUrl);
return SPContext.Current.Site.MakeFullUrl(SPContext.Current.Web.ServerRelativeUrl);
return HttpContext.Current.Request.Url.GetLeftPart(UriPartial.Path);
return SPContext.Current.File.Url;
return "http://" + Request.ServerVariables["SERVER_NAME"] + Request.ServerVariables["URL"];
