>>No, it didn't work. I tried all possible combinations yesterday I could think of and was not able to make it.
>
>I think you may be expecting to be able to embed too much code into the aspx (not saying it's not possible, but that I would try a different approach). I would just create a method in the code-behind file that accepts an object parameter and returns a string. Then from within the aspx file, call the method and pass in the eval:
>
>
>// In ASPX file, something like this:
>< %= this.FormatField(Eval("Field")) % >
>
>
>In your codebehind just convert it back into it's original type or to a string and return back whatever you'd like, ex. ToString()
Exactly the solution I got on ASP.NET forum and already implemented as a static public method of a public class since I need this in two pages. The only problem now remains to be able to set custom textbox property from the JavaScript.
See answer here
http://forums.asp.net/t/1287094.aspx
If it's not broken, fix it until it is.
My Blog