473,396 Members | 2,115 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Page hangs on resize

If anyone can point me in the right direction it would be most appreciated.

I find that if I change the page size, either maximize or restore down, my
web app freezes. I've put breakpoints in every conceivable place. There's
nothing in the event viewer. I know there is an error somewhere, but I don't
see it. This site is extremely simple.

Each page contains an editable datagrid. The datasets bound to each grid
contain no more than 50 records. Each page contains the same code.

BindData
Editdatagrid
Updatedatagrid
InsertNewRecord

Below is a snip of one page:
===============================================
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here
Try
PLUser = Session("Current")

If IsPostBack = False Then
BindData()
Else
PLForm = Session("PLFORM")
End If

Catch ex As Exception

End Try

End Sub

Private Sub BindData()
Try
PLForm = PLForm.Load(FORMID)

Session("PLFORM") = PLForm

Catch ex As Exception

End Try

Try
If PLUser.SecurityLevel < 3 Then
PLForm = AddRow(PLForm)
End If
Catch ex As Exception

End Try

Try
dgPayouts.CssClass = "datagrid"
dgPayouts.HeaderStyle.CssClass = "headerstyle"
dgPayouts.ItemStyle.CssClass = "itemstyle"
dgPayouts.SelectedItemStyle.CssClass = "selecteditemstyle"
dgPayouts.EditItemStyle.CssClass = "edititemstyle"
dgPayouts.DataSource = PLForm.DataEntry
dgPayouts.DataBind()

Catch ex As Exception

End Try
End Sub

Private Sub dgPayouts_ItemDataBound(ByVal sender As Object, ByVal e As
System.Web.UI.WebControls.DataGridItemEventArgs) Handles
dgPayouts.ItemDataBound
If e.Item.ItemType = ListItemType.Item Or _
e.Item.ItemType = ListItemType.AlternatingItem Or _
e.Item.ItemType = ListItemType.SelectedItem Or _
e.Item.ItemType = ListItemType.Item.EditItem Then

Dim btn As New WebControls.Button
Dim iCount As Int32
Dim dgi As New BoundColumn

Try
If PLUser.SecurityLevel < 3 Then
dgi = dgPayouts.Columns(1)
dgi.ReadOnly = False

dgi = dgPayouts.Columns(3)
dgi.ReadOnly = False
End If
Catch ex As Exception

End Try
Try

For iCount = 0 To e.Item.Cells(0).Controls.Count - 1

If TypeOf e.Item.Cells(0).Controls(iCount) Is
WebControls.Button Then
btn = e.Item.Cells(0).Controls(iCount)
btn.CssClass = "datagridButton"

If PLUser.SecurityLevel < 3 Then
If e.Item.ItemIndex = 0 And btn.Text = "Edit" Then
btn.Text = "New"
End If
End If

End If
Next
Catch ex As Exception

End Try

End If
End Sub

Public Sub dgPayouts_EditCommand(ByVal source As Object, ByVal e As
System.Web.UI.WebControls.DataGridCommandEventArgs ) Handles
dgPayouts.EditCommand
Dim dgColEdit As New BoundColumn
Dim iCount As Int32
Dim txt As TextBox

Try
dgPayouts.EditItemIndex = e.Item.ItemIndex
BindData()

Catch ex As Exception
Response.Write(ex.Message)
End Try
End Sub

Public Sub dgPayouts_UpdateCommand(ByVal source As Object, ByVal e As
System.Web.UI.WebControls.DataGridCommandEventArgs ) Handles
dgPayouts.UpdateCommand
Dim paramData() As Object
Dim iCount As Int32
Dim txt As New TextBox
Dim ds As New DataSet
Dim bolSuccess As Boolean

ReDim paramData(e.Item.Cells.Count - 1)

Try
If PLForm Is Nothing Then
PLForm = Session("PLFORM")
ds = PLForm.DataEntry
Else
ds = PLForm.DataEntry
End If
Catch ex As Exception

End Try

Try
For iCount = 0 To e.Item.Cells.Count - 1
Select Case iCount
Case 0
paramData.SetValue(PLUser.SecurityLevel, iCount)
Case 1, 3
paramData.SetValue(e.Item.Cells(iCount).Text, iCount)
Case 2

paramData.SetValue(ds.Tables(0).Rows(iCount).Item( 1), iCount)
Case Is > 3
txt = e.Item.Cells(iCount).Controls(0)
paramData.SetValue(txt.Text, iCount)
End Select
Next

Catch ex As Exception
Response.Write(ex.Message)

End Try

Try

bolSuccess = PLForm.Save(PLForm, PLUser.LogonId,
PLUser.SecurityLevel, FORMID, paramData)

If bolSuccess = True Then
BindData()
Else
lblErrMsg.Visible = True
lblErrMsg.Text = "Error saving data." '"Error saving data.
This issue has been reported"
End If
Catch ex As Exception

End Try

End Sub

Private Function AddRow(ByVal plform As PL_BusinessRules.PL_DataEntry)
As PL_BusinessRules.PL_DataEntry

Dim ds As New DataSet
Dim dt As New DataTable
Dim dr As DataRow

Try
ds = plform.DataEntry

dr = ds.Tables(0).NewRow

dr.Item("RECORD_SORT_ORDER") = "0"

ds.Tables(0).Rows.InsertAt(dr, 0)
plform.DataEntry = ds

Return plform

Catch ex As Exception

End Try
End Function

#End Region

End Class
Apr 26 '06 #1
4 1149
Changing the page size does not cause a post back so it is not anything to do
with your code or your web ap. Have you tried this from several machines, it
is probably a client thing, dodgy browser/windows instalation or somesuch.

"Tamichan" wrote:
If anyone can point me in the right direction it would be most appreciated.

I find that if I change the page size, either maximize or restore down, my
web app freezes. I've put breakpoints in every conceivable place. There's
nothing in the event viewer. I know there is an error somewhere, but I don't
see it. This site is extremely simple.

Each page contains an editable datagrid. The datasets bound to each grid
contain no more than 50 records. Each page contains the same code.

BindData
Editdatagrid
Updatedatagrid
InsertNewRecord

Below is a snip of one page:
===============================================
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here
Try
PLUser = Session("Current")

If IsPostBack = False Then
BindData()
Else
PLForm = Session("PLFORM")
End If

Catch ex As Exception

End Try

End Sub

Private Sub BindData()
Try
PLForm = PLForm.Load(FORMID)

Session("PLFORM") = PLForm

Catch ex As Exception

End Try

Try
If PLUser.SecurityLevel < 3 Then
PLForm = AddRow(PLForm)
End If
Catch ex As Exception

End Try

Try
dgPayouts.CssClass = "datagrid"
dgPayouts.HeaderStyle.CssClass = "headerstyle"
dgPayouts.ItemStyle.CssClass = "itemstyle"
dgPayouts.SelectedItemStyle.CssClass = "selecteditemstyle"
dgPayouts.EditItemStyle.CssClass = "edititemstyle"
dgPayouts.DataSource = PLForm.DataEntry
dgPayouts.DataBind()

Catch ex As Exception

End Try
End Sub

Private Sub dgPayouts_ItemDataBound(ByVal sender As Object, ByVal e As
System.Web.UI.WebControls.DataGridItemEventArgs) Handles
dgPayouts.ItemDataBound
If e.Item.ItemType = ListItemType.Item Or _
e.Item.ItemType = ListItemType.AlternatingItem Or _
e.Item.ItemType = ListItemType.SelectedItem Or _
e.Item.ItemType = ListItemType.Item.EditItem Then

Dim btn As New WebControls.Button
Dim iCount As Int32
Dim dgi As New BoundColumn

Try
If PLUser.SecurityLevel < 3 Then
dgi = dgPayouts.Columns(1)
dgi.ReadOnly = False

dgi = dgPayouts.Columns(3)
dgi.ReadOnly = False
End If
Catch ex As Exception

End Try
Try

For iCount = 0 To e.Item.Cells(0).Controls.Count - 1

If TypeOf e.Item.Cells(0).Controls(iCount) Is
WebControls.Button Then
btn = e.Item.Cells(0).Controls(iCount)
btn.CssClass = "datagridButton"

If PLUser.SecurityLevel < 3 Then
If e.Item.ItemIndex = 0 And btn.Text = "Edit" Then
btn.Text = "New"
End If
End If

End If
Next
Catch ex As Exception

End Try

End If
End Sub

Public Sub dgPayouts_EditCommand(ByVal source As Object, ByVal e As
System.Web.UI.WebControls.DataGridCommandEventArgs ) Handles
dgPayouts.EditCommand
Dim dgColEdit As New BoundColumn
Dim iCount As Int32
Dim txt As TextBox

Try
dgPayouts.EditItemIndex = e.Item.ItemIndex
BindData()

Catch ex As Exception
Response.Write(ex.Message)
End Try
End Sub

Public Sub dgPayouts_UpdateCommand(ByVal source As Object, ByVal e As
System.Web.UI.WebControls.DataGridCommandEventArgs ) Handles
dgPayouts.UpdateCommand
Dim paramData() As Object
Dim iCount As Int32
Dim txt As New TextBox
Dim ds As New DataSet
Dim bolSuccess As Boolean

ReDim paramData(e.Item.Cells.Count - 1)

Try
If PLForm Is Nothing Then
PLForm = Session("PLFORM")
ds = PLForm.DataEntry
Else
ds = PLForm.DataEntry
End If
Catch ex As Exception

End Try

Try
For iCount = 0 To e.Item.Cells.Count - 1
Select Case iCount
Case 0
paramData.SetValue(PLUser.SecurityLevel, iCount)
Case 1, 3
paramData.SetValue(e.Item.Cells(iCount).Text, iCount)
Case 2

paramData.SetValue(ds.Tables(0).Rows(iCount).Item( 1), iCount)
Case Is > 3
txt = e.Item.Cells(iCount).Controls(0)
paramData.SetValue(txt.Text, iCount)
End Select
Next

Catch ex As Exception
Response.Write(ex.Message)

End Try

Try

bolSuccess = PLForm.Save(PLForm, PLUser.LogonId,
PLUser.SecurityLevel, FORMID, paramData)

If bolSuccess = True Then
BindData()
Else
lblErrMsg.Visible = True
lblErrMsg.Text = "Error saving data." '"Error saving data.
This issue has been reported"
End If
Catch ex As Exception

End Try

End Sub

Private Function AddRow(ByVal plform As PL_BusinessRules.PL_DataEntry)
As PL_BusinessRules.PL_DataEntry

Dim ds As New DataSet
Dim dt As New DataTable
Dim dr As DataRow

Try
ds = plform.DataEntry

dr = ds.Tables(0).NewRow

dr.Item("RECORD_SORT_ORDER") = "0"

ds.Tables(0).Rows.InsertAt(dr, 0)
plform.DataEntry = ds

Return plform

Catch ex As Exception

End Try
End Function

#End Region

End Class

Apr 26 '06 #2
Have you tried this in FF?
Apr 26 '06 #3
Intranet site, IE only.

"Pramod Anchuparayil" wrote:
Have you tried this in FF?

Apr 26 '06 #4
I'm still looking for an answer if anyone has any ideas

"Tamichan" wrote:
Intranet site, IE only.

"Pramod Anchuparayil" wrote:
Have you tried this in FF?

May 1 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Paul Robinson | last post by:
I am developing a website in ASP that connects to a Sybase database. However, when I try to open a connection to the database the page will not load. The script does not timeout, nor the...
2
by: Brad Quinn | last post by:
It appears that IIS hangs the first time two requests are made for same page in quick succession. Although it may very well be something else I'm doing wrong. I have a page (ViewDocument.aspx)...
0
by: Jeff | last post by:
Hi - I have an ASP.NET page that hangs (some times; if it loads for you, try refresh/F5 several times) when I try to run it on my localhost. It contains an HTML table for formatting, and within...
2
by: Andrus | last post by:
VSE 2005 .NET 2 WinForms I have DataGridView in virtual mode containing huge number of rows. When user double clicks in column separator line in grid header, application hangs: grid tries to...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.