How can I do client side text formatting on a Data-bound field inside a repeater?
<p>I have a repeater control with some html controls being populated from some server side DataSource. The code for these controls inside the repeater looks something like this..</p>

<pre><code>&lt;img src='&lt;%# DataBinder.Eval(Container.DataItem, "Path")%&gt;' title='&lt;%# DataBinder.Eval(Container.DataItem, "Name")%&gt;' alt=""&gt;
</code></pre>

<p>I needed to format some of the text so I added a method to this code. The method I added is a server side method though. So I'm assuming this isn't exactly the best way to handle things in terms of performance. The code looked something like this...</p>

<pre><code>&lt;span&gt;&lt;%# trimItemName((DataBinder.Eval(Container.DataItem, "Name"))%&gt;&lt;/span&gt;
</code></pre>

<p>trimItemName(Object obj) is a server side method that will obviously trim the name.</p>

<p>Is there a way I can do this using javascript so doing a simple string trimming (or any other kind of formatting) doesn't have to be done on the server side?</p>
