1<!--First the html-->
2<script type="text/javascript">
3 function updateProgress(percentage) {
4 document.getElementById('ProgressBar').style.width = percentage+"%";
5 }
6</script>
7<!--Define your function or call it from a .js file-->
8<!--On the C# Code behind-->
9 string updateProgress = "18%";
10 ClientScript.RegisterStartupScript(this.GetType(), "updateProgress", "updateProgress('" + updateProgress + "');", true);
11<!--You can pass C# variables as parameters to the js function this way: '" + param + "'-->