如何引用 “用户控件”---在web.config中
2007-10-12 16:25
302 查看
<system.web>
<pages>
<controls>
<add tagPrefix="user" tagName="RandomQuote" src="~/UserControls/RandomQuote.ascx"/>
</controls>
</pages>
</system.web>
但是:
Be aware that there is one important limitation when registering User Controls in the Web.config file. When a User Control is registered in the Web.config file, you cannot place the User Control in the same folder as a page that uses the User Control. To work around this limitation, you should always place all of your User Controls in a separate folder. I typically create a User Controls folder for each of my web applications.
<pages>
<controls>
<add tagPrefix="user" tagName="RandomQuote" src="~/UserControls/RandomQuote.ascx"/>
</controls>
</pages>
</system.web>
但是:
Be aware that there is one important limitation when registering User Controls in the Web.config file. When a User Control is registered in the Web.config file, you cannot place the User Control in the same folder as a page that uses the User Control. To work around this limitation, you should always place all of your User Controls in a separate folder. I typically create a User Controls folder for each of my web applications.
相关文章推荐
- 如何在Web.config中注册用户控件和自定义控件
- 技巧和诀窍:如何在Web.config中注册用户控件和自定义控件
- 如何在Web用户控件中引用样式表中的样式
- ASP.NET用户控件也可以在Web.Config中进行引用
- Tip #4 ASP.NET用户控件也可以在Web.Config中进行引用
- [转]技巧和诀窍:如何在Web.config中注册用户控件和自定义控件
- 如何在Web用户控件中引用样式表中的样式
- 如何在Web.config中注册用户控件和自定义控件
- 技巧和诀窍:如何在Web.config中注册用户控件和自定义控件
- [转]技巧和诀窍:如何在Web.config中注册用户控件和自定义控件
- 如何在Web.config中注册用户控件和自定义控件
- 如何在Web.config中注册用户控件和自定义控件
- 如何在Web.config中注册用户控件和自定义控件
- 如何在Web用户控件中引用样式表中的样式
- (转贴)技巧和诀窍:如何在Web.config中注册用户控件和自定义控件
- 如何在Web.config中注册用户控件和自定义控件
- Tip #4 ASP.NET用户控件也可以在Web.Config中进行引用
- 如何在Web.config中注册用户控件和自定义控件
- 在Web用户控件中引用样式表中样式的方法
- asp.net 2.0小tips:在web.config里设置用户定义控件