我要写一个web控件库,从ListBox类继承
using System;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.ComponentModel;
using System.Collections;
namespace MyControls
{
[DefaultProperty("Text"),
ToolboxData("<{0}:MyControl runat=server></{0}:MyControl>")]
public class MyControl : System.Web.UI.WebControls.ListBox {
}
}问题是:我需要重写ListBox.Items.Add方法,怎么做?
using System;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.ComponentModel;
using System.Collections;
namespace MyControls
{
[DefaultProperty("Text"),
ToolboxData("<{0}:MyControl runat=server></{0}:MyControl>")]
public class MyControl : System.Web.UI.WebControls.ListBox {
}
}问题是:我需要重写ListBox.Items.Add方法,怎么做?
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货