views:

194

answers:

1

In the code behind I have a function that returns a List(Of SomeClass):

rptRepeater.DataSource = SomeFunction(SomeVariable) rptRepeater.DataBind()

In the html I have a basic repeater layout and am using the below code to get the Properties of each object returned.

<%#Databinder.Eval(Container.DataItem, "Parameter1")%>

My question is, would there ever be a case that it would execute the Function more than once?

+1  A: 

It will only call the function per the number of times you call rptRepeater.DataBind().

And also, the code

<%#Databinder.Eval(Container.DataItem, "Parameter1")%>

can be shortened to

<%# Eval("Parameter1") %>
Amry
Turns out my problem wasn't an issue of Binding twice. The problem was that users were able to fire the event twice and it looked like it was binding twice.
Frenchie