I have a webform where i use tabstrips and multipage.I click a button reset and call onclick event doreset to clear all the fields after adding a record.My function doreset works out well in an ordinary webcontrols form.but it is not checking my controls inside the multipage.
Is this line correct for a multipage.
If objwctype.FullName = "System.Web.UI.ControlCollection.TextBox"
I am stuck with this.anybody pls help.
tx.
Here goes my code
<aspnet:tabstrip id="mytabstrip" Targetid="mpVert" runat="server" Width="700px" Height="22px" Font-Size="8pt" AutoPostBack="True" TabSelectedStyle="background-color:#c0c0c0;color:#000000;border-bottom:none;" TabHoverStyle="background-color:#E0E0E0;color:#000000;" TabDefaultStyle="background-color:#666699;">
<aspnet:Tab runat="server" Text="Information"></aspnet:Tab>
<aspnet:Tab runat="server" Text="Details"></aspnet:Tab>
</aspnet:tabstrip>
<aspnet:MultiPage id="mpVert" runat="server">
<aspnetageView id="PageView1" runat="server">
I use my webcontrols like textboxes,checkboxes for information tags here........
</aspnetageview>
<aspnetageView id="PageView2" runat="server">
I use the webcontrols for details tab here
</aspnetageview>
</aspnet:multipage>
sub doReset(sender as object,e as eventargs)
Dim objc As Control
Response.Write(Page.Controls.Count)
For Each objc In Page.Controls
Dim objType As Type = objc.GetType
If objType.FullName = "System.Web.UI.HtmlControls.HtmlForm" Then
Dim objf As HtmlForm = objc
Dim objwc As Control
For Each objwc In objf.Controls
Dim objwctype As Type = objwc.GetType
If objwctype.FullName = "System.Web.UI.ControlCollection.TextBox"
Then
Dim objtb As TextBox = objwc
objtb.Text = ""
End If
Next
End If
Next
end sub
Is this line correct for a multipage.
If objwctype.FullName = "System.Web.UI.ControlCollection.TextBox"
I am stuck with this.anybody pls help.
tx.
Here goes my code
<aspnet:tabstrip id="mytabstrip" Targetid="mpVert" runat="server" Width="700px" Height="22px" Font-Size="8pt" AutoPostBack="True" TabSelectedStyle="background-color:#c0c0c0;color:#000000;border-bottom:none;" TabHoverStyle="background-color:#E0E0E0;color:#000000;" TabDefaultStyle="background-color:#666699;">
<aspnet:Tab runat="server" Text="Information"></aspnet:Tab>
<aspnet:Tab runat="server" Text="Details"></aspnet:Tab>
</aspnet:tabstrip>
<aspnet:MultiPage id="mpVert" runat="server">
<aspnetageView id="PageView1" runat="server">
I use my webcontrols like textboxes,checkboxes for information tags here........
</aspnetageview>
<aspnetageView id="PageView2" runat="server">
I use the webcontrols for details tab here
</aspnetageview>
</aspnet:multipage>
sub doReset(sender as object,e as eventargs)
Dim objc As Control
Response.Write(Page.Controls.Count)
For Each objc In Page.Controls
Dim objType As Type = objc.GetType
If objType.FullName = "System.Web.UI.HtmlControls.HtmlForm" Then
Dim objf As HtmlForm = objc
Dim objwc As Control
For Each objwc In objf.Controls
Dim objwctype As Type = objwc.GetType
If objwctype.FullName = "System.Web.UI.ControlCollection.TextBox"
Then
Dim objtb As TextBox = objwc
objtb.Text = ""
End If
Next
End If
Next
end sub