I am using a jQueryUI ProgressBar to show users how much allowed file storage they have used. The percentage is calculated in code-behind and should be passed to Javascript.
This is a bit cleaner IMHO :-)
$("#progressbar").progressbar({ value: $("#<%=filesPercentage.ClientID%>").val() });