WEB用户控件能否带参啊?
------解决方案--------------------------------------------------------
用属性啊,专干这个的!
UserControl 里:
private int level;
public int Level
{
get
{
return level
}
set
{
level = value;
}
}
调用时:
<cc1:电话本控件 id= "WebCustomControl22 " Level= "100 " runat= "server " width=60% > </cc1:电话本控件>
页面的 CS 里:
WebCustomControl22.Level 这样来调用 当然也可以 WebCustomControl22.Level = xxx 来赋值