There are a couple of ways you could do this depending on what you want. Your HtmlHelper's ViewContext property will have just about everything you need about the particular request: HttpContext, RequestContext, RouteData, TempData, ViewData, etc.
To get the current path of the request, try helper.ViewContext.HttpContext.Request.Path
. This would return the actual request path, likely "/" or "/home/index" if the path was explicit in the URL.
I'm not sure why you looking to get "/home/partial". Since this is a partial view the request would always come from somewhere else, eg. "/home/index".
Regardless, you can check the RouteData and obtain the (partial) action and controller, among other route values:
public static string TestHelper(this HtmlHelper helper)
{
var controller = helper.ViewContext.RouteData.Values["controller"].ToString();
var action = helper.ViewContext.RouteData.Values["action"].ToString();
return controller + "/" + action;
}
If called in your Index view (Index.aspx) it would return "Home/Index".
If called in your Partial view (Partial.aspx) it would return "Home/Partial".
Hope that helps.