In my ASP.NET WebApplication I have the following entry in my web.config:
<pages controlRenderingCompatibilityVersion="3.5" clientIDMode="Static">
<namespaces>
<add namespace="XSS=Microsoft.Security.Application" />
</namespaces>
</pages>
This enables me to use the AntiXSS-Library within my Pages and Controls in an easy and short way without using the fully qualified namespace every time, like this:
<%# XSS.Encoder.HtmlEncode(Eval("something").ToString()) %>
instead of
<%# Microsoft.Security.Application.Encoder.HtmlEncode(Eval("Branche_lbl").ToString()) %>
This works perfectly in ASP.NET, unfortunately Resharper seems to be unable to resolve the alias, marks the line as error and says
Cannot resolve symbol: XSS
Is there a way to solve this problem?