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..

```
<img src='<%# DataBinder.Eval(Container.DataItem, "Path")%>' title='<%# DataBinder.Eval(Container.DataItem, "Name")%>' alt="">

```

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...

```
<span><%# trimItemName((DataBinder.Eval(Container.DataItem, "Name"))%></span>

```

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

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?