extending asp.net control in the website project

杀马特。学长 韩版系。学妹 提交于 2019-12-05 19:36:52

use :

<%@Register TagPrefix="local" Assembly="App_Code" Namespace="Controls" %>

Also, you HAVE to defines a namespace where to put your controls (from memory, when adding class to App_code, no namespace is generated by default).

namespace Controls {
    public class control1 : WebControl {
    }

}

and then , in the aspx file

<local:control1 runat="server", id="youreluckyitworks" />
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!