Hello,
I have an ASP.NET web form that uses an ASP.NET Repeater. The data source for this repeater is a DataTable that includes a column called "City", and one called "State". In the ItemTemplate of the Repeater, I want to call a custom method I've written called "FormatLocation". This method is defined as:
protected string FormatLocation(string city, string state)
{
string location = city;
if (state.Length > 0)
location += ", " + state.ToUpper();
return location;
}
I want to call this method when the data is bound in the ItemTemplate so that the result appears in the UI. Can someone tell me how to do this? Thanks!