Add new comment

I found your solution to be one of the easier ones to implement, but found if I used it inside an UpdatePanel to prevent full page postbacks the formatting was lost.

The solution provided here helped me:

I added a function in your js that I could call using Sys.Application.add_load(jScript); inside the ContentTemplate of the UpdatePanel.