[update] From your comments, I don't think the problem is with a large table. Therefore, this answer does not apply, but I will leave it because it seems that this question arises many times on SO.
Try the "compatibility view", the same problem?
Try reducing the page size. For instance,
- remove unnecessary empty space (do it first, because it's easiest)
- temporarilly CSS , ,
- temporarilly , , , ..
Public Class SearchPage
Inherits System.Web.UI.Page
'NOTE
'short names for variables, controls, and so on, are specifically to reduce file size.
'used 69,106 records for
' testing/development (this will increase by 10,000 per month)
'limited to 10,000 records for production (customer rarely will have more than 10,000 and only a few will always have 10,000+)
Private Const DefaultResultLimit As Integer = 10000
Private Const CheckPoint As Integer = 100
Private Sub PopulateSearchResults(ByVal oResults As DataTable)
Dim iCount As Integer
For Each oRow As DataRow In oResults.Rows
AddTableRow(tblBOM, New BomInfo(oRow))
iCount += 1
If (iCount Mod CheckPoint) = 0 Then
If Not Me.Response.IsClientConnected Then
Exit For
End If
End If
If iCount > Me.ResultLimit Then
'limit results
Exit For
End If
Next
End Sub
Private Sub AddTableRow(ByVal table As Table, ByVal bom As BomInfo)
'NOTE
'short names for variables, controls, and so on, are specifically to reduce file size.
Dim oRow As New TableRow
oRow.CssClass = "btr"
oRow.Cells.Add(CreateCell(New HighlightControl(bom.ManufacturerName, _searchTerm, "sv"), "btc"))
oRow.Cells.Add(CreateCell(New HighlightControl(bom.Mpn, _searchTerm, "sv"), "btc"))
oRow.Cells.Add(CreateCell(New HighlightControl(bom.PartDescription, _searchTerm, "sv"), "btc"))
oRow.Cells.Add(CreateCell(New HighlightControl(bom.Markings, _searchTerm, "sv"), "btc"))
oRow.Cells.Add(CreateCell(bom.IcLength, "btc cntr"))
oRow.Cells.Add(CreateCell(bom.IcWidth, "btc cntr"))
oRow.Cells.Add(CreateCell(bom.PackageType, "btc cntr"))
oRow.Cells.Add(CreateCell(bom.PinCount, "btc cntr"))
oRow.Cells.Add(CreateCell(FormatCurrency(bom.ComponentPrice), "btch cr"))
oRow.Cells.Add(CreateCell(FormatCurrency(bom.ComponentTotal), "btc cr"))
oRow.Cells.Add(CreateCell(bom.Quantity, "btc cntr"))
oRow.Cells.Add(CreateCell(bom.ReleaseDate, "btc cr"))
oRow.Cells.Add(CreateCell(bom.ModelInfo, "btc"))
oRow.Cells.Add(CreateCell(bom.ComponentFunction, "btc"))
table.Rows.Add(oRow)
End Sub
'...
ElseIf oResults.Rows.Count > Me.ResultLimit Then
'only display the records up to the limit
'then notify user
__recordLimitWarning.Text = " " + String.Format(Me.ResultLimitText, Me.ResultLimit.ToString("N0"))
__recordLimitWarning.Visible = True
End If
'....