In your repeater, instead of just putting a reference to a field in there, 
put in a reference to a function that manipulates the field.  That is, instead 
of this:

<%# DataBinder.Eval(Container.DataItem, "strMembershipType")%>

you would use this:

<%# CheckMember(DataBinder.Eval(Container.DataItem, "strMembershipType"))%>

..where CheckMember analyzes the string, modifies it if necessary, and then 
spits out the result which is shown in your repeater.

Cheers,

Peter

 From: "Mike Belcher" [EMAIL PROTECTED]

I used a repeater in some instances but I don't see how to customize and
programmatically do the checks on membership type etc before it outputs. The
look of the output is dependant on different conditions. With a repeater it
reads it then just binds to the repeater and I can't do all that
programmatic stuff......... unless there is a way........ to do that.

-----Original Message-----
From: [email protected]
[mailto:[EMAIL PROTECTED] On Behalf Of Peter Brunone
Sent: Friday, June 24, 2005 4:31 PM
To: [email protected]
Subject: re: [AspNetAnyQuestionIsOk] Speed of output................
building literals..........

   How about using a Repeater...?

From: "Mike Belcher" [EMAIL PROTECTED]

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. 

----------------------------------------------------------------------------

----

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 = "" & strMembershipType & ""

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 = "" & strNextPaymentDueDate & ""

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

End If

LiteralOutput.Text = LiteralOutput.Text & ""

LiteralOutput.Text = LiteralOutput.Text & "nowrap>"

LiteralOutput.Text = LiteralOutput.Text & "size='1'>"

LiteralOutput.Text = LiteralOutput.Text &
"href='AdministratorUpdateSubscriber.aspx?username=" & strUsername &

"'>Edit color='#000080'>| "

LiteralOutput.Text = LiteralOutput.Text &
"size='1'>href='AdministratorDeleteSubscriber.aspx?username=" & strUsername
&

"'>Delete "

LiteralOutput.Text = LiteralOutput.Text & ""

LiteralOutput.Text = LiteralOutput.Text & "size='1'>"' target=_blank>View "

LiteralOutput.Text = LiteralOutput.Text & " "

LiteralOutput.Text = LiteralOutput.Text & "nowrap>strUsername & "'>" &
strUsername & " "

LiteralOutput.Text = LiteralOutput.Text & "align='center' nowrap>" &
strSitenameDB &

" "

LiteralOutput.Text = LiteralOutput.Text & "align='center' nowrap>" &
strMembershipType &

" "

LiteralOutput.Text = LiteralOutput.Text & "align='center' nowrap>" &
strLastPaymentAmount

& " "

LiteralOutput.Text = LiteralOutput.Text & "align='center' nowrap>" &
strLastPaymentDate &

" "

LiteralOutput.Text = LiteralOutput.Text & "align='center' nowrap>" &

strNextPaymentDueDate & " "

LiteralOutput.Text = LiteralOutput.Text & "align='center' nowrap>" &
strDateJoined &

" "

LiteralOutput.Text = LiteralOutput.Text & "align='center' nowrap>" &
strP_Updated &

" "

End While


[Non-text portions of this message have been removed]



 
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