现在的位置: 首页 > 综合 > 正文

怎么遍历页面上的Input控件

2013年05月01日 ⁄ 综合 ⁄ 共 552字 ⁄ 字号 评论关闭

 

    Dim j As Integer
        
For j = 0 To (Me.Controls.Count) - 1
            
If Me.Controls(j).GetType().ToString() = "System.Web.UI.HtmlControls.HtmlForm" Then
                
Dim i As Integer
                
For i = 0 To (Me.Controls(j).Controls.Count) - 1

                    
If TypeOf Me.Controls(j).Controls(i) Is HtmlInputText Then
                        
Dim tb As HtmlInputText = CType(Me.Controls(j).Controls(i), HtmlInputText)
                        tb.Value 
= "888"
                    
End If


                
Next i
            
End If
        
Next j
【上篇】
【下篇】

抱歉!评论已关闭.