I wanted to ask some of the gurus here about speed and building output with
literals. I can and already have this it is a matter of speed. It seems a
lot slower than aspclassic was but is basically doing the same thing. So far
there are about 750 records that it outputs. This takes a minute with the
code below. I have a aspclassic site in comparison that outputs 3000 records
and does it in 1/10th the time. Is there a way to speed this up? Thanks. 


<CODE>
----------------------------------------------------------------------------
----


While objDataReader.Read()

            'DATABASE FIELDS
            strTotalSubscribers = strTotalSubscribers + 1
            strUsername = objDataReader("Username")
            strMembershipType = objDataReader("MembershipType")
            strSitenameDB = objDataReader("Sitename")
            strDateJoined = objDataReader("DateJoined")
            strP_Updated = objDataReader("P_Updated")
            strLastPaymentAmount = objDataReader("LastPaymentAmount")
            strLastPaymentDate = objDataReader("LastPaymentDate")
            strNextPaymentDueDate = objDataReader("NextPaymentDueDate")



            'MembershipType Detection
            If strMembershipType = "Premium Member" Then
                strMembershipType = "<span style='background-color:
#00FF00'>" & strMembershipType & "</span>"

            ElseIf strMembershipType = "Standard Member" Then

            Else 'They aren't logged in or aren't a member.

            End If


            'Is Payment OverDue Detection
            If strNextPaymentDueDate < DateTime.Now().ToShortDateString()
Then
                strNextPaymentDueDate = "<span style='background-color:
#FF0000'>" & strNextPaymentDueDate & "</span>"

            Else 'They aren't logged in or aren't a member.

            End If



            LiteralOutput.Text = LiteralOutput.Text & "<tr>"
            LiteralOutput.Text = LiteralOutput.Text & "<td align='center'
nowrap>"

            LiteralOutput.Text = LiteralOutput.Text & "<font face='Verdana'
size='1'>"
            LiteralOutput.Text = LiteralOutput.Text & "<a target='_blank'
href='AdministratorUpdateSubscriber.aspx?username=" & strUsername &
"'>Edit</a></font><b><font face='Verdana' size='1'
color='#000080'>|</font></b>"
            LiteralOutput.Text = LiteralOutput.Text & "<font face='Verdana'
size='1'><a target='_blank'
href='AdministratorDeleteSubscriber.aspx?username=" & strUsername &
"'>Delete</a></font>"
            LiteralOutput.Text = LiteralOutput.Text & "<b><font
face='Verdana' size='1' color='#000080'>|</font></b>"
            LiteralOutput.Text = LiteralOutput.Text & "<font face='Verdana'
size='1'><a target='_blank' href='s_profile.aspx?username=" & strUsername &
"'>View</a></font>"


            LiteralOutput.Text = LiteralOutput.Text & "</td>"
            LiteralOutput.Text = LiteralOutput.Text & "<td align='center'
nowrap><font face='Verdana' size='1'><b><a href='s_profile.aspx?username=" &
strUsername & "'>" & strUsername & "</a></b></font></td>"
            LiteralOutput.Text = LiteralOutput.Text & "<td width='158'
align='center' nowrap><font face='Verdana' size='1'>" & strSitenameDB &
"</font></td>"
            LiteralOutput.Text = LiteralOutput.Text & "<td width='128'
align='center' nowrap><font face='Verdana' size='1'>" & strMembershipType &
"</font></td>"
            LiteralOutput.Text = LiteralOutput.Text & "<td width='70'
align='center' nowrap><font face='Verdana' size='1'>" & strLastPaymentAmount
& "</font></td>"
            LiteralOutput.Text = LiteralOutput.Text & "<td width='86'
align='center' nowrap><font face='Verdana' size='1'>" & strLastPaymentDate &
"</font></td>"
            LiteralOutput.Text = LiteralOutput.Text & "<td width='78'
align='center' nowrap><font face='Verdana' size='1'>" &
strNextPaymentDueDate & "</font></td>"

            LiteralOutput.Text = LiteralOutput.Text & "<td width='86'
align='center' nowrap><font face='Verdana' size='1'>" & strDateJoined &
"</font></td>"
            LiteralOutput.Text = LiteralOutput.Text & "<td width='78'
align='center' nowrap><font face='Verdana' size='1'>" & strP_Updated &
"</font></td>"

        End While


<CODE>
----------------------------------------------------------------------------
----




 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/AspNetAnyQuestionIsOk/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to