As a side note (and maybe it will fix your issue anyway) if you don't want to have the .htc file at your root, you can do the following to get around the relative pathing issues inherent with behaviors. It's not the prettiest solution, but it works well -
In your css, define the behavior as:behavior: url(CSS3PIE);
Then in your Global.asax.cs have the following code:
protected void Application_BeginRequest(Object sender, EventArgs e)
{
CheckForCSSPIE();
}
private void CheckForCSSPIE()
{
if (!Regex.IsMatch(Request.Url.ToString(), "CSS3PIE"))
{
return;
}
const string appRelativePath = "~/Content/css/PIE.htc";
var path = VirtualPathUtility.ToAbsolute(appRelativePath);
Response.Clear();
Response.StatusCode = (int)HttpStatusCode.MovedPermanently;
Response.RedirectLocation = path;
Response.End();
}
It will simply look for any request matching "CSS3PIE" and return the .htc file from the correct location.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…