Click to See Complete Forum and Search --> : slow performance
Ginab
Feb 28th, 2005, 03:09 PM
Hi All,
I inherited the VB .Net application. Its performance is not great - it takes 8-10 sec to go page to page. I did some time debugging and it takes about 7 seconds to hit the Page_Init after clicking on MoveNext button. Any ideas what could cause this?
Thanks,
Gina
dj4uk
Mar 1st, 2005, 09:06 AM
Maybe it's just tired ;)
Would be useful to have some code to look at my psychic skills are playing up today!
DJ
Ginab
Mar 1st, 2005, 10:31 AM
Since the problem happens somewhere before PageInit and PageLoad what is running at that time? What code would you like to look at?
Thanks!
dj4uk
Mar 1st, 2005, 10:42 AM
Hang on is this a VB.Net windows application or an ASP.NET web application?
DJ
Ginab
Mar 1st, 2005, 12:57 PM
It's written in VB.Net and ran on the web server as it's our intranet application.
dj4uk
Mar 2nd, 2005, 04:30 AM
Ok just checking it was an ASP.NET web application.
Could you post one of the aspx pages for us to view to try and work out what is happening.
DJ
nemaroller
Mar 2nd, 2005, 06:54 AM
If its running slow in debug mode through the IDE (f5)... that's normal.
If its slow after you hit it typing a url into your web browser ... that's not.
Ginab
Mar 2nd, 2005, 12:05 PM
Hi nemaroller,
Unfortunatly it's running slow in the server not in the debug mode. My user is sick and tired of waiting to flip from page to page.
Hi dj4uk,
Here is part (otherwise it's too long) of the aspx page.
Thanks a lot guys!
<%@ Register TagPrefix="uc1" TagName="Header" Src="controls/Header.ascx" %>
<%@ Page Language="vb" AutoEventWireup="false" Codebehind="BasicInfo.aspx.vb" Inherits="Services.BasicInfo"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<title>BasicInfo</title>
<meta content="Microsoft Visual Studio.NET 7.0" name="GENERATOR">
<meta content="Visual Basic 7.0" name="CODE_LANGUAGE">
<meta content="JavaScript" name="vs_defaultClientScript">
<meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">
</HEAD>
<body bgColor="ghostwhite" MS_POSITIONING="GridLayout">
<form id="Form1" method="post" runat="server">
<TABLE id="Table3" style="Z-INDEX: 101; WIDTH: 760px; POSITION: absolute" cellSpacing="0"
cellPadding="0" border="0">
<TR>
<TD><uc1:header id="Header" runat="server"></uc1:header></TD>
</TR>
<TR>
<TD> </TD>
</TR>
<TR>
<TD><asp:label id="LabelTitle" style="Z-INDEX: 100; LEFT: 250px; POSITION: absolute" runat="server"
ForeColor="HotTrack" Font-Size="small" Font-Bold="True">BASIC INFORMATION</asp:label></TD>
</TR>
</TABLE>
<TABLE id="Table1" style="Z-INDEX: 102; LEFT: 40px; WIDTH: 669px; POSITION: absolute; TOP: 120px"
cellSpacing="4" cellPadding="0" width="369" border="0">
<TR>
<TD><asp:label id="Label2" runat="server" Width="106px"> Name</asp:label>
<asp:textbox id="TextBox_Name" tabIndex="1" runat="server" Width="300px" MaxLength="50"></asp:textbox>
<asp:label id="Label44" runat="server" Width="50px">ID</asp:label>
<asp:textbox id="TextBox_ID" tabIndex="1" runat="server" Width="38px" Enabled="False" BackColor="LavenderBlush"></asp:textbox>
</TD>
<asp:regularexpressionvalidator id="rev_Name" runat="server" ErrorMessage="Name character(s) not accepted."
ValidationExpression="[A-Za-z0-9&'\/ ,.-]+" Display="None" ControlToValidate="TextBox_Name"></asp:regularexpressionvalidator>
</TR>
<asp:panel id="pnl_ContactInfo" Runat="server">
<TR>
<TD>
<asp:label id="Label13" runat="server" Font-Bold="True" Font-Size="X-Small" Width="106px" Font-Italic="True">Contact Name 1</asp:label>
<asp:textbox id="TextBox_Salutation" tabIndex="4" runat="server" Width="50px" MaxLength="24"></asp:textbox>
<asp:textbox id="TextBox_FirstName" tabIndex="5" runat="server" Width="112px" MaxLength="40"></asp:textbox>
<asp:textbox id="TextBox_MI" tabIndex="6" runat="server" Width="48px" MaxLength="1"></asp:textbox>
<asp:textbox id="TextBox_LastName" tabIndex="7" runat="server" Width="178px" MaxLength="40"></asp:textbox></TD>
</TR>
<TR>
<TD>
<asp:label id="Label42" runat="server" Width="106px">Job Title</asp:label>
<asp:textbox id="TextBox_JobTitle" tabIndex="13" runat="server" Width="400px" MaxLength="3"></asp:textbox></TD>
</TR>
<TR>
<TD>
<asp:label id="Label4" runat="server" Width="106px">Phone Number</asp:label>
<asp:label id="Label9" runat="server"> Ext </asp:label>
<asp:textbox id="TextBox_Phone_Extension" tabIndex="15" runat="server" Width="62px" MaxLength="5"></asp:textbox></TD>
</TR>
<TR>
<TD>
<asp:label id="Label5" runat="server" Width="106px">Fax Number</asp:label> <asp:textbox id="TextBox_FAX_Number" tabIndex="17" runat="server" Width="112px" MaxLength="7"></asp:textbox>
<asp:label id="Label18" runat="server" Width="45px">E-mail</asp:label>
<asp:textbox id="Textbox_EmailAddress" tabIndex="18" runat="server" Width="176px" MaxLength="9"></asp:textbox></TD>
<asp:regularexpressionvalidator id="rev_FaxArea" runat="server" ControlToValidate="TextBox_FAX_AreaCode" Display="None"
ValidationExpression="[0-9 -]+" ErrorMessage="FAX number character(s) not accepted."></asp:regularexpressionvalidator>
</TR>
<TR style="HEIGHT: 5px">
<TD
<asp:label id="Label11" runat="server" Font-Size="XX-Small">Salutation</asp:label>
<asp:label id="Label19" runat="server" Font-Size="XX-Small">First Name</asp:label>
<asp:label id="Label22" runat="server" Font-Size="XX-Small">M.I.</asp:label>
<asp:label id="Label23" runat="server" Font-Size="XX-Small">LastName</asp:label></TD>
</TR>
<TR>
<TD>
<asp:label id="Label25" runat="server" Font-Bold="True" Font-Size="X-Small" Width="106px" Font-Italic="True">Contact Name 2</asp:label>
<asp:textbox id="TextBox_FirstName2" tabIndex="5" runat="server" Width="112px" MaxLength="40"></asp:textbox>
<asp:textbox id="TextBox_MI2" tabIndex="6" runat="server" Width="48px" MaxLength="1"></asp:textbox>
<asp:textbox id="TextBox_LastName2" tabIndex="7" runat="server" Width="178px" MaxLength="40"></asp:textbox></TD>
</TR>
<TR>
<TD>
<asp:label id="Label43" runat="server" Width="106px">Job Title</asp:label>
<asp:textbox id="TextBox_JobTitle2" tabIndex="13" runat="server" Width="400px" MaxLength="3"></asp:textbox></TD>
</TR>
<TR>
<TD style="HEIGHT: 23px">
<asp:label id="Label26" runat="server" Width="106px">Phone Number</asp:label>
<asp:textbox id="TextBox_Phone_AcreaCode2" tabIndex="13" runat="server" Width="50px" MaxLength="3"></asp:textbox>
<asp:textbox id="TextBox_Phone_Number2" tabIndex="14" runat="server" Width="112px" MaxLength="7"></asp:textbox>
<asp:label id="Label27" runat="server"> ext </asp:label>
<asp:textbox id="TextBox_Phone_Extension2" tabIndex="15" runat="server" Width="62px" MaxLength="5"></asp:textbox></TD>
<asp:regularexpressionvalidator id="rev_PhoneArea2" runat="server" ControlToValidate="TextBox_Phone_AcreaCode2"
Display="None" ValidationExpression="[0-9 -]+" ErrorMessage="Phone number character(s) not accepted."></asp:regularexpressionvalidator>
<asp:regularexpressionvalidator id="rev_Phone2" runat="server" ControlToValidate="TextBox_Phone_Number2" Display="None"
ValidationExpression="[0-9 -]+" ErrorMessage="Phone number character(s) not accepted."></asp:regularexpressionvalidator>
<asp:regularexpressionvalidator id="rev_PhoneExt2" runat="server" ControlToValidate="TextBox_Phone_Extension2" Display="None"
ValidationExpression="[0-9 -]+" ErrorMessage="Phone number character(s) not accepted."></asp:regularexpressionvalidator></TR>
<TR>
<TD>
<asp:label id="Label39" runat="server" Width="106px">FAX Number</asp:label>
<asp:textbox id="TextBox_FAX_AreaCode2" tabIndex="16" runat="server" Width="50px" MaxLength="3"></asp:textbox>
<asp:textbox id="TextBox_FAX_Number2" tabIndex="17" runat="server" Width="112px" MaxLength="7"></asp:textbox>
<asp:label id="Label40" runat="server" Width="45px">e-Mail</asp:label>
<asp:textbox id="Textbox_EmailAddress2" tabIndex="18" runat="server" Width="176px" MaxLength="9"></asp:textbox></TD>
<asp:regularexpressionvalidator id="rev_FaxArea2" runat="server" ControlToValidate="TextBox_FAX_AreaCode2" Display="None"
ValidationExpression="[0-9 -]+" ErrorMessage="FAX number character(s) not accepted."></asp:regularexpressionvalidator>
<asp:regularexpressionvalidator id="rev_Fax2" runat="server" ControlToValidate="TextBox_FAX_Number2" Display="None"
ValidationExpression="[0-9 -]+" ErrorMessage="FAX number character(s) not accepted."></asp:regularexpressionvalidator></TR>
</asp:panel>
<TR>
<TD> </TD>
</TR>
<TR>
<TD style="HEIGHT: 61px"><asp:label id="Label37" runat="server" Width="88px" Height="45px">Comments</asp:label>
<asp:textbox id="TextBox_Comments" tabIndex="34" runat="server" Width="440px" MaxLength="255"
Height="70px" Wrap="True"></asp:textbox></TD>
</TR>
<TR>
<TD>
</TD>
</TR>
<TR>
<TD>
<HR style="Z-INDEX: 103; WIDTH: 109.19%; POSITION: absolute" width="109.19%" color="#4b92d9"
noShade SIZE="7">
</TD>
</TR>
<TR>
<TD><asp:button id="Button_ClearFields" style="Z-INDEX: 114; LEFT: 322px" tabIndex="32" runat="server"
ForeColor="White" Font-Bold="True" Width="132px" Text="Clear Fields" BorderWidth="5px" BorderStyle="Outset"
BackColor="Desktop"></asp:button><asp:button id="Button_Delete" style="Z-INDEX: 114; LEFT: 322px" tabIndex="32" runat="server"
ForeColor="White" Font-Bold="True" Width="132px" Text="Delete" BorderWidth="5px" BorderStyle="Outset" BackColor="Desktop"></asp:button> <asp:button id="Button_Save" tabIndex="31" runat="server" Font-Bold="True" ForeColor="White"
Width="132px" Text="Save/Next>" BackColor="Desktop" BorderStyle="Outset" BorderWidth="5px"></asp:button></TD>
</TR>
<TR>
<TD>
</TD>
</TR>
<asp:validationsummary id="ValidationSummary1" runat="server" ShowMessageBox="True" ShowSummary="False"></asp:validationsummary></TABLE>
</form>
</body>
</HTML>
nemaroller
Mar 2nd, 2005, 06:52 PM
Step 1:
Change all <asp:label> tags to <SPAN> tags (and ditch the runat="server" attribute for all these spans).
The only time you need to have a runat="server" is if you have conditional logic toward that element. So if you wanted to change the text of the label on the backside depending on a user choice (or hide the label itself), you would run it at server, where code-behind logic could inspect the choice and change the label text, or mark the element invisible. In short, if the text never changes - and the control is always visible, change the label to a generic html <span>.
Changing from asp:label to a span also helps trim viewstate.. (which I imagine yours is quite large). Viewstate must be parsed and inspected on each request - even postbacks.
Step 2:
Post your code-behind , because thats where most of the performance difference can be gained.
dj4uk
Mar 3rd, 2005, 03:11 AM
Yeah the code behind would be useful.
Have you tried running it in trace mode? - this gives you timings for operations - you never know there might be something glaringly obvious.
DJ
hellswraith
Mar 3rd, 2005, 10:32 PM
Step 1:
Change all <asp:label> tags to <SPAN> tags (and ditch the runat="server" attribute for all these spans).
The only time you need to have a runat="server" is if you have conditional logic toward that element. So if you wanted to change the text of the label on the backside depending on a user choice (or hide the label itself), you would run it at server, where code-behind logic could inspect the choice and change the label text, or mark the element invisible. In short, if the text never changes - and the control is always visible, change the label to a generic html <span>.
Changing from asp:label to a span also helps trim viewstate.. (which I imagine yours is quite large). Viewstate must be parsed and inspected on each request - even postbacks.
Step 2:
Post your code-behind , because thats where most of the performance difference can be gained.
That will only cut about 1/10 of a second off the page load, not really worth the effort unless he has millions of people showing up at the site every month. There are only 20 label controls on that page. That is pretty small and not worth worrying about yet.
He is talking 6-7 seconds for a page to post and come back, which means that the server is probably overloaded. Sure, if the code behind is doing some wacky stuff, that could be the problem, but my guess is the server is way overloaded, or there is some huge database work or something happening in the code behind.
Ginab
Mar 4th, 2005, 12:13 PM
Hi Guys! Thank you so much for looking at my code and giving me great suggestions. I'm in NJ for couple of days and won't be able to connect to my app until Monday. I'll post some VB code then - however, as I mentioned before the delay happens somewhere before it hits the PageLoad. I'll also try changing labels to SPAN as I am willing to try everything at this point.
How can I run it in trace mode (I've never done it before...) As far as server oveload... I have couple of more apps running on the same web server but they don't give any performance problem. Initially I thought that it may be the db connection/script issue but it looks like the delay happens before it even connects to the database.
Have a great weekend!
Gina
Ginab
Mar 8th, 2005, 04:32 PM
Hi Guys! I am back at the office. Replacing LABEL with SPAN didn't improve much of the performance. In my WebConfig I added:
<trace enabled="true" requestLimit="10" pageOutput="false" traceMode="SortByTime" localOnly="true" />
Here is what I got back:
No. Time of Request File Status Code Verb
1 3/8/2005 2:12:25 PM /List.aspx 200 GET View Details
2 3/8/2005 2:12:37 PM /List.aspx 302 POST View Details
3 3/8/2005 2:12:44 PM /BasicInfo.aspx 200 GET View Details
4 3/8/2005 2:12:48 PM /BasicInfo.aspx 302 POST View Details
5 3/8/2005 2:12:48 PM /ApprovedProducts.aspx 200 GET View Details
List.aspx is the initial/first page in the app and BasicInfo is the second. These are the two pages I'm having performance problems with. I pasted below the trace detail for the List.aspx 302 POST. I've never used Trace before, could you please advise?
Category Message From First(s) From Last(s)
aspx.page Begin Init
aspx.page End Init 0.000081 0.000081
aspx.page Begin LoadViewState 0.000110 0.000029
aspx.page End LoadViewState 0.000352 0.000242
aspx.page Begin ProcessPostData 0.000373 0.000021
aspx.page End ProcessPostData 0.016914 0.016541
aspx.page Begin ProcessPostData Second Try 5.676209 5.659295
aspx.page End ProcessPostData Second Try 5.738690 0.062481
aspx.page Begin Raise ChangedEvents 5.738803 0.000113
aspx.page End Raise ChangedEvents 5.738850 0.000047
aspx.page Begin Raise PostBackEvent 5.738894 0.000044
nemaroller
Mar 8th, 2005, 08:21 PM
Step 2.
Post your code.
Ginab
Mar 9th, 2005, 12:02 PM
Option Explicit On
Imports System.IO
Imports System.Text
Imports System.Data
Imports System.Data.SqlClient
Imports System.Diagnostics
Imports Services.DBAccess
Imports Services.ProductGroups
Public Class TPABasicInfo
Inherits System.Web.UI.Page
Private oConfigurationInformation As ConfigurationInformation
Private oDBAccess As DBAccess
Private oProductGroups As ProductGroups
Dim drTPAA As DataRow
Protected WithEvents tbRegion As System.Web.UI.WebControls.TextBox
Private htPgRegions As Hashtable
Private htPgSalesC As Hashtable
Dim ID As String
Protected WithEvents TextBox_Name As System.Web.UI.WebControls.TextBox
blah-blah------------
#Region " Web Form Designer Generated Code "
'This call is required by the Web Form Designer.
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
End Sub
Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init
'CODEGEN: This method call is required by the Web Form Designer
'Do not modify it using the code editor.
InitializeComponent()
End Sub
#End Region
Private Class SalesConsultant
Public Name As String
Public RegionCode As Integer
Public RegionText As String
Public Producer_Id As Integer
End Class
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
On Error GoTo Fctn_Error
Dim sErr As String
Dim sUserName As String
Dim sUserLogonId As String
sUserLogonId = Request.ServerVariables("LOGON_USER")
If sUserLogonId.Length < 1 Then
Response.Clear()
Response.Status = "Unauthorized"
Response.AddHeader("WWW-Authenticate", "NTLM")
Response.End()
End If
If InStr(sUserLogonId, "\") <> 0 Then
sUserLogonId = Mid(sUserLogonId, InStr(sUserLogonId, "\") + 1)
End If
Dim sAppPhyPath As String = Request.PhysicalApplicationPath()
oConfigurationInformation = New ConfigurationInformation(sAppPhyPath)
sUserName = oConfigurationInformation.GetApplicationUsers(sUserLogonId.ToLower())
If IsNothing(sUserName) Then
Response.Redirect("NotAValidUser.aspx")
End If
If sUserName.Length < 1 Then
Response.Redirect("NotAValidUser.aspx")
End If
Dim sUserRights As String = oConfigurationInformation.GetApplicationUsersRights(sUserLogonId.ToLower())
If sUserRights.IndexOf("w") < 1 Then
Response.Redirect("List.aspx")
End If
oDBAccess = New DBAccess(oConfigurationInformation)
oProductGroups = New ProductGroups(oDBAccess, oConfigurationInformation)
drTPAA = Nothing
TPAA_ID = ""
If IsNothing(Session("List_TPAAid")) Then
' error
Else
TPAA_ID = CType(Session("List_TPAAid"), String)
If TPAA_ID = "0" Then
LabelTitle.Text = "NEW"
drTPAA = oDBAccess.GetTopRow()
drTPAA("first_name") = ""
blah-blah---------------
Else
drTPAA = oDBAccess.GetName(TPAA_ID)
End If
End If
If IsPostBack() Then
Else
If Not IsNothing(drTPAA) Then
TextBox_first_name.Text = drTPAA("first_name")
blah-blah-----------------
End If
End If
Fctn_Error:
sErr = Err.Description
End Sub
end class
PLEASE LET ME KNOW IF YOU NEED TO SEE SOME OTHER CODE AS WELL. THANKS!
nemaroller
Mar 9th, 2005, 05:37 PM
Can you just upload that code file? Its hard to see it all in perspective otherwise.
nemaroller
Mar 9th, 2005, 05:48 PM
You know I just realized you said it takes 7 seconds to break at the PAGE_INIT function. That's really messed up. Is the Move Next button posting back to this page?
Btw, I organized your code a little...(left out the designer generated code)
Option Explicit On
Imports System.Data
Imports System.Data.SqlClient
Imports System.Diagnostics
Imports System.IO
Imports System.Web
Imports System.Web.UI
Imports System.Text
Imports Services.DBAccess
Imports Services.ProductGroups
Public Class TPABasicInfo
Inherits System.Web.UI.Page
Private htPgRegions As Hashtable
Private htPgSalesC As Hashtable
Private oConfigurationInformation As ConfigurationInformation
Private oDBAccess As DBAccess
Private oProductGroups As ProductGroups
Protected WithEvents LabelTitle As System.Web.UI.WebControls.Label
Protected WithEvents tbRegion As System.Web.UI.WebControls.TextBox
Protected WithEvents TextBox_first_name As System.Web.UI.WebControls.TextBox
Private Class SalesConsultant
Public Name As String
Public RegionCode As Integer = -1
Public RegionText As String
Public Producer_Id As Integer = -1
End Class
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) _
Handles MyBase.Load
Dim drTPAA As DataRow
Dim sErr As String
Dim sUserName As String
Dim sUserLogonId As String
Dim sAppPhyPath As String
Dim sUserRights As String
Dim TPAA_ID As String
Try
sUserLogonId = Request.ServerVariables("LOGON_USER")
If sUserLogonId.Length < 1 Then
Response.Clear()
Response.Status = "Unauthorized"
Response.AddHeader("WWW-Authenticate", "NTLM")
Response.End()
End If
If InStr(sUserLogonId, "\") <> 0 Then
sUserLogonId = Mid(sUserLogonId, InStr(sUserLogonId, "\") + 1)
End If
sAppPhyPath = Request.PhysicalApplicationPath()
oConfigurationInformation = New ConfigurationInformation(sAppPhyPath)
sUserName = oConfigurationInformation.GetApplicationUsers(sUserLogonId.ToLower())
If IsNothing(sUserName) Then Response.Redirect("NotAValidUser.aspx")
If sUserName.Length < 1 Then Response.Redirect("NotAValidUser.aspx")
sUserRights = oConfigurationInformation.GetApplicationUsersRights(sUserLogonId.ToLower())
If sUserRights.IndexOf("w") < 1 Then Response.Redirect("List.aspx")
oDBAccess = New DBAccess(oConfigurationInformation)
oProductGroups = New ProductGroups(oDBAccess, oConfigurationInformation)
drTPAA = Nothing
TPAA_ID = String.Empty
If IsNothing(Session("List_TPAAid")) Then
' error
Throw New ApplicationException("Some type of error")
Else
TPAA_ID = CType(Session("List_TPAAid"), String)
If TPAA_ID = "0" Then
LabelTitle.Text = "NEW"
drTPAA = oDBAccess.GetTopRow()
drTPAA("first_name") = String.Empty
Else
drTPAA = oDBAccess.GetName(TPAA_ID)
End If
End If
If IsPostBack() Then
Else
If Not IsNothing(drTPAA) Then TextBox_first_name.Text = drTPAA("first_name")
End If
Catch ex As Exception
sErr = ex.Message
End Try
End Sub
End Class
Ginab
Mar 9th, 2005, 06:49 PM
Thank you so much Nemaroller for taking your time to help me.. Yes, the MoveNext button is posting back to the current page before it goes on to the next one. Right now I have a suspicion that the way the front page was designed maybe the clue to the performance issue. I'd like to show you the code to get your opinion. How can I upload the code file for your review?
Ginab
dj4uk
Mar 10th, 2005, 03:11 AM
Submit a reply and add an attachment to it. You can only attach certain file types so you may have to put your files into a zip file.
HTH
DJ
Ginab
Mar 10th, 2005, 12:37 PM
The code attached has been created by someone to build a table to display about 600 rows in the first page of the app. The PageLoad is calling the BuildTable() function in the attachment. Since the performance is slow for only first and second pages I suspect that this fucnction could have been designed better ( I maybe wrong). It goes thru the function to load the first page and second (since the MoveNext button is posting back to the current page before hitting the PageLoad of the 2nd page). Please advise. I appreciate your help a lot!
Ginab
Ginab
Mar 14th, 2005, 11:52 AM
Just following up.... Thanks!
Ginab
Mar 17th, 2005, 12:32 PM
Hi dj4uk and nemaroller!
I attached the code file about a week ago. Could you please help?
Thanks
Gina
nemaroller
Mar 21st, 2005, 07:37 AM
Seems the original author has viewstate enabled for each table cell... and if you figure approximately 15 cells per row * 600 rows = the viewstate for this page is TOO big.
There is also a lot of unnecessary code in there - the storecell function assign enableviewstates to true - a total of 3 times for the same object.
I will have a look at this code after in more detail. Send the code for the ENTIRE PAGE - not just the suspect function, otherwise there could be something screwy in the page_load and we would never have known about it.
Ginab
Mar 23rd, 2005, 05:03 PM
Thanks again for you help Nemaroller! As you had asked I attached the entire code for the first page. On the buttom of the attachment I included the function from another page that deals with retrieving/updating the data. This function selects the data that is displayed in the page. I'll be reducing the number of cells displayed in each row to about 4-5.
Thanks,
Gina
nemaroller
Mar 24th, 2005, 10:39 AM
I don't envy you - that code is all over the place - there should be some extensive refactoring done.
The StoreCell function passes datarows via value rather than reference - which means it is instantiating a datarow object within the function, then returning that object to the caller. It would probably help some to pass that byref instead.
The GetPPANames function should call a stored procedure which you should have created in the database. Using dynamic sql for such a common use is a performance hit.
Ginab
Mar 28th, 2005, 03:17 PM
Thanks Nemaroller! I'll incorporate your suggestions and see what happens!
Gina
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.