WEB复合控件的属性问题
做一个复合控件,里面有几个超链接,我想通过一个属性来一次性改变URL
private ListItemCollection linkUrl = new ListItemCollection();
[Bindable(true)]
[Category( "Appearance ")]
[DefaultValue( " ")]
[Localizable(true)]
[Description( "链接指向的URL ")]
public ListItemCollection LinkUrl
{
get
{
return linkUrl;
}
set
{
linkUrl = value;
link1.Text = value[0].Text;
link1.Text = value[1].Text;
link1.Text = value[2].Text;
link1.Text = value[3].Text;
link1.Text = value[4].Text;
link1.Text = value[5].Text;
link1.NavigateUrl = value[0].Value;
link2.NavigateUrl = value[1].Value;
link3.NavigateUrl = value[2].Value;
link4.NavigateUrl = value[3].Value;
link5.NavigateUrl = value[4].Value;
link6.NavigateUrl = value[5].Value;
}