B
Boban Dragojlovic
I have the following control defined (among others) ... it represents the
active form on the ASP
Protected WithEvents frmMain As System.Web.UI.HtmlControls.HtmlForm
Then I have this
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
If Page.IsPostBack Then
For Each ctl As WebControl In Me.frmMain.Controls
If ctl.CssClass = "FieldInError" Then
ctl.CssClass = ""
End If
Next
End If
End Sub
The "for each" loop is just designed to clear up any "highlighting" I may
have done during a previous round trip.
When this code is executed, the 'for each ....' statement crashes ASP.NET
The error in the Application Log says that it was recycled because it sucked
up too much memory. I watched it. It goes from 30k to 360k within a couple
of seconds.
I stepped through this code, and it never gets to the 'if ctl.cssClass'
statement ... it dies on the 'for each' statement.
Any ideas?
active form on the ASP
Protected WithEvents frmMain As System.Web.UI.HtmlControls.HtmlForm
Then I have this
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
If Page.IsPostBack Then
For Each ctl As WebControl In Me.frmMain.Controls
If ctl.CssClass = "FieldInError" Then
ctl.CssClass = ""
End If
Next
End If
End Sub
The "for each" loop is just designed to clear up any "highlighting" I may
have done during a previous round trip.
When this code is executed, the 'for each ....' statement crashes ASP.NET
The error in the Application Log says that it was recycled because it sucked
up too much memory. I watched it. It goes from 30k to 360k within a couple
of seconds.
I stepped through this code, and it never gets to the 'if ctl.cssClass'
statement ... it dies on the 'for each' statement.
Any ideas?