呵呵,我来回答你吧
只需要在你控件或者组件的类的上面加上ToolboxBitmapAttribute即可
如下所示(我只在windows form 控件做了测试,对于web Form我想应该也可以的)
using System;
using System.Windows.Forms;
using System.Drawing;
namespace Zxd
{
[ToolboxBitmap("open.bmp")]//注意:参数为你的位图路径,在我的实验里,它与所生成的Test.Dll文件在同一个目录下
public class Test:System.Windows.Forms.UserControl//控件
{
省略
}
}