Ask a Question related to ASP.NET General, Design and Development.
-
Boban Dragojlovic #1
server crashes when I access a certain control
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?
Boban Dragojlovic Guest
-
using javascript in User controls to access server controls of the user control
Hello all, I have an asp.net textbox (named txtHidden) and an HtmlButton(named btnAction). I wanted to write a javascript function which will get... -
Custom Server Control works on page but not User Control...why?
I'm developing the DevEdit.NET server control (an online HTML editor - www.devedit.com) but there's an extremely bizarre bug. The control runs fine... -
#6674 [Com]: Apache crashes as soon as I access my server running PHP 4.0.2 + mod_perl 1.24
ID: 6674 Comment by: peitschie at hotmail dot com Reported By: ruudc at home dot nl Status: Closed Bug Type: ... -
Building a custom control that implement table server control
Hi, I want to create a custom control that implements the table htmlcontrol. In my webform page I want to include that custom control and add... -
Query crashes Access 2000
I am working on a Access database for a client that uses office 2000 on winXp, I use OfficeXP.on win2000. Using access 2000 fileformat. Everything... -
William F. Robertson, Jr. #2
Re: server crashes when I access a certain control
Most of the controls in the Controls collection are not going to be
WebControl so it would bomb. Get them as Control and then test for children
and is it a WebControl. You will have to step into the children to get the
controls say...under the HtmlForm control.
bill
"Boban Dragojlovic" <news@_N_O_S_P_AM_dragojlovic.org> wrote in message
news:SicVa.19$xC6.65705165@newssvr13.news.prodigy. com...sucked>
> 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 itcouple> up too much memory. I watched it. It goes from 30k to 360k within a> 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?
>
>
>
>
>
>
William F. Robertson, Jr. Guest



Reply With Quote

