简体   繁体   English

如何在 web 表单中添加 2 个用户控件

[英]How to add the 2 user control in web form

I am using User Controls in my webforms我在我的网络表单中使用用户控件

when I am adding 2nd user controls it's not working当我添加第二个用户控件时它不起作用

   <%@ Register src="~/Pages/UserControls/ProjectDetails.ascx" TagName="ProjectDetails" TagPrefix="ucPrjDetails" %>

<%@ Register src="~/Pages/UserControls/UCBSiteDetails.ascx" TagName="SiteDetails" TagPrefix="ucPrjDetails" %>

网站详情

when I tried to add in web.config also it's not allowing当我尝试添加 web.config 时,它也不允许

things you can try that helped me out in the past:你可以尝试过去帮助我的事情:

  • Clean build干净的构建
  • Delete the page and recreate it, then add the user controls again删除页面并重新创建它,然后再次添加用户控件
  • Make use of intellisense in source code mode of the page, don't use drag and drop to put the user controls在页面的源代码模式中使用智能感知,不要使用拖放来放置用户控件

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何动态添加和从用户控件中删除用户控件的形式 - how to add dynamically and remove a user control from a user control in a form 将用户控件添加到表单 - add user control to a form 如何将用户控件.ascx添加到同一解决方案中另一个项目中的Web窗体 - How to add a user control .ascx to a web form which is in another project in the same solution 如何将控件添加到另一个用户控件的窗体上的面板 - How to add a control to a panel on a form from another user control Web表单用户控件呈现HTML - Web Form User Control Render HTML 将ASP Web表单转换为用户控件 - Converting ASP Web Form to User Control 以编程方式将Web用户控件的对象添加到另一个用户控件中 - Programmatically add an object of web user control into another user control 如何通过用于Web表单的Web用户控件获取主页上的文本框,日历和ddl的值 - how to get values of textbox, calendar, and ddl on main page through web user control used on web form 创建一个Web用户控件并在Web窗体上使用?,以及如何在首页上获取ddl,日历(在ascx上使用)的值 - create a web user control and used on web form?, and How to get value of ddl, calendar(used on ascx) on main page 如何将ASP Web用户控件中的表单控件与页面的其余表单控件隔离开? - How can I isolate the form controls in a ASP Web User Control from the rest of the page's form controls?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM