1.首先在你的自定义控件的前边加上下面黄色所示代码:

1  [ToolboxData(@"<{0}:SmartGridView runat='server'></{0}:SmartGridView>")]
2     [System.Drawing.ToolboxBitmap(typeof(YYControls.Resources.Icon), "SmartGridView.bmp")]
3     public partial class SmartGridView : GridView
4     {
5     }

VS 2010会自动添加到工具箱中,VS2012则新添加一个选项卡,然后把生成的dll加进去就可以了,如下图所示:

怎样让一个自定义控件在工具箱中可见

相关文章:

  • 2021-06-22
  • 2022-12-23
  • 2022-12-23
  • 2021-07-02
  • 2021-09-27
  • 2021-10-18
猜你喜欢
  • 2021-12-13
  • 2022-01-12
  • 2021-10-25
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案