image

编辑人: 人逝花落空

calendar2025-04-22

message9

visits125

请编程遍历页面上所有 TextBox 控件并给它赋值为 string.Empty ?

foreach (System.Windows.Forms.Control control in this.Controls)

{

if (control is System.Windows.Forms.TextBox)

{

System.Windows.Forms.TextBox tb = (System.Windows.Forms.TextBox)control ;

tb.Text = String.Empty ;

}

}

喵呜刷题:让学习像火箭一样快速,快来微信扫码,体验免费刷题服务,开启你的学习加速器!

创作类型:
原创

本文链接:请编程遍历页面上所有 TextBox 控件并给它赋值为 string.Empty ?

版权声明:本站点所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明文章出处。
分享文章
share