您的位置:首页 > 其它

如何引用 “用户控件”---在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.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: