The question is why do I need to add the "import" directive to my Site.Master file to get Intellisense when the html helpers work without it.
Using a simple C # string extension method without a namespace == is not a problem. However, I wanted this namespace extension to be a good programmer.
If I wrap it in a namespace , you need to do a couple of things. Here is my extension:
namespace MySystemCore
{
public static class StringExtensions
{
public static string F(this string s, params object[] args)
{
return string.Format(s, args);
}
}
}
So, through trial and error, I work, but wanted to share my observations. Hope this can help someone else in the future.
. Site.Master
"using MySystemCore"; Site.Master.cs ( codebehind)
"<add namespace="MySystemCore">" <namespaces> web.config
# 1 # 2
"<%@ Import Namespace="MySystemCore" %>" Site.Master