吴旭晓个人博客 繁体中文 简体中文

首页| 日志 |JAVA |ASP |PHP |Android |IOS |ASP.NET |JavaScript |DIV+CSS |SEO |taobaoke |饼哥语录
繁体中文 简体中文

ASP.NET控制Panel的隐藏与显示

-------------------------往Panel里面添加文本框和按钮-------------------------------­

int textNum­

int btnNum­

textNum=Convert.ToInt32(this.TextBox1.Text);­

btnNum=Convert.ToInt32(this.TextBox2.Text);­

for(int i=0;i<textNum;i++)­

this.Panel1.Controls.Add(new TextBox());­

for(int j=0;j<btnNum;j++)­

this.Panel1.Controls.Add(new Button());­

-------------------------日历中选择的数进行显示-------------------------------­

this.Label1.Text=this.Calendar.SelectedDate.ToShortDateString();­

-------------------------控制Panel的隐藏与显示----------------------------------­

this.Panel1.Visible=false;­

this.Panel1.Visible=false;­

//按钮1­

this.Panel1.Visible=true;­

this.Panel2.Visible=false;­

//按钮2­

this.Panel1.Visible=false;­

this.Panel2.Visible=true; ­

作者:吴旭晓 | 来源:个人博客 | 点击量:4469 | 发布时间:2010-09-08
最新留言 | 返回上一页 | 返回首页

相关文章:

版权所有:吴旭晓个人博客 Copyright © 2013-2023 个人博客