I don't believe there is any way to do that in the config file for C# files.
This isn't exactly what you're asking for, but the closest thing to it is that you can register namespaces in the web.config that are then usable within ascx/aspx markup files, as Steven mentioned. Below is an example:
<configuration>
<system.web>
<pages>
<namespaces>
<add namespace="System.Web.Mvc"/>
<add namespace="System.Web.Mvc.Ajax"/>
<add namespace="System.Web.Mvc.Html"/>
<add namespace="System.Web.Routing"/>
<add namespace="System.Linq"/>
<add namespace="System.Collections.Generic"/>
<!-- Add your own namespaces here -->
</namespaces>
</pages>
</system.web>
</configuration>
EDIT: added another suggestion below:
If you had several using statements that had to be included within most of your .cs files, then the best thing I could suggest is to either A) keep those using statements handy where you can just copy/paste them as needed, or B) create a C# code snippet, such as the example below:
<?xml version="1.0" encoding="utf-8" ?>
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
<CodeSnippet Format="1.0.0">
<Header>
<Title>using MyApp</Title>
<Shortcut>usingmyapp</Shortcut>
<Description>Code snippet for common using statements with MyApp</Description>
<Author></Author>
<SnippetTypes>
<SnippetType>Expansion</SnippetType>
</SnippetTypes>
</Header>
<Snippet>
<Code Language="csharp">
<![CDATA[using MyApp.Common;
using MyApp.Common.Extensions;
using MyApp.Domain;
using MyApp.Models;
// *** add whatever using statements you want here ***
$end$]]>
</Code>
</Snippet>
</CodeSnippet>
</CodeSnippets>
After you add that file into the appropriate location (...\My Documents\Visual Studio 2008\Code Snippets\Visual C#\My Code Snippets), then you should then just be able to start typing "usingmyapp" (or whatever you put inside the <Shortcut>
element) at the location of your .cs file where you want the using statements to appear; intellisense should recognize it and autocomplete it for you by inserting the <Code>
content of the code snippet.
Personally, I don't bother with doing something like this; I don't like to add a bunch of using statements to my file if some of them are not actually being used in that file. Additionally, I think adding several using statements in bulk could potentially lead to confusing ambiguous name conflicts if you start using a class name that appears in multiple namespaces. But I think that's just a personal preference; if you want to do this, go ahead.