开发者

Add new namespace to all newly created pages in asp.net with c#

I have required System.Text.RegularExpres开发者_运维知识库sions namespace to all my pages on my webproject.so want to add this namespace by default when new page is created on my project.so what i do for this.


You can add it to the web.config, and then it will not need to be specified on any page. http://msdn.microsoft.com/en-us/library/ms164642.aspx

<configuration>
 <system.web>
    <pages>
      <namespaces>
        <add namespace ="System.Text.RegularExpressions" />
      </namespaces>
    </pages>  
 </system.web>
</configuration>


You can create custom project item templates and have this template appear in the Add New Item dialog box.

For more details see How to: Create Item Templates

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜