請問,是否有根据条件不同显示不同的内容的用户控件? 晕,所有有Text或Caption属性的控件都可以啊。楼主问的太简略了吧?都不知道你到底要干什么 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 用户控件是可以根据需要添加属性的属性如果是public,就可以在html代码中使用比如public class myUserControl : System.Web.UI.UserControl{ public int Mode { get; set; }}可以这样用:<uc1:myUserControl id="myUserControl1" runat="server" Mode="1"></uc1:myUserControl> 动态调用CONTROL 当然可以啊. 随你怎么搞. Page有一个方法Page.LoadControl()用于读取用户控件的 謝謝,第一次用用戶控件,to uno ,若是動態載入用戶控件,這些屬性應該怎樣賦值 用代码,访问类/对象的属性myUserControl.Mode = (int); System.Web.UI.Control ctrl = Page.LoadControl("myUserControl.ascx");if (ctrl is myUserControl){ myUserControl myUserControl1 = (myUserControl)ctrl; myUserControl1.Mode = ...;} 网站如何快速实现繁体和简体间的切换 滚动条高度设置 非哥 如果我的admin中,除了login。aspx可以被直接访问,其他必须要... 未将对象引用设置到对象的实例。 htm页面的按钮点击事件如何实现向同页面的Aspx文件传输参数,并激发aspx的load事件? 什么情况下应该用静态方法 利用AdRotator制作Banner的问题 通过fileupload +button 怎么向远程服务器传图片? iframe关闭时及时释放内存问题 求大神解决这个问题,做网站是用gridview连接数据库,后来运行就这样了 如何取出磁盘下的目录并生成菜单啊 谁能用通俗的话说下IOC到底有什么用?
是可以根据需要添加属性的属性如果是public,就可以在html代码中使用比如public class myUserControl : System.Web.UI.UserControl
{
public int Mode { get; set; }
}可以这样用:
<uc1:myUserControl id="myUserControl1" runat="server" Mode="1"></uc1:myUserControl>
if (ctrl is myUserControl)
{
myUserControl myUserControl1 = (myUserControl)ctrl;
myUserControl1.Mode = ...;
}