how to call javascript function with parameter in c#
string updateProgress = "18%";
ClientScript.RegisterStartupScript(this.GetType(), "updateProgress", "updateProgress('" + updateProgress + "');", true);
how to call javascript function with parameter in c#
string updateProgress = "18%";
ClientScript.RegisterStartupScript(this.GetType(), "updateProgress", "updateProgress('" + updateProgress + "');", true);
passing parameters from C# to js fucntions
<!--First the html-->
<script type="text/javascript">
function updateProgress(percentage) {
document.getElementById('ProgressBar').style.width = percentage+"%";
}
</script>
<!--Define your function or call it from a .js file-->
<!--On the C# Code behind-->
string updateProgress = "18%";
ClientScript.RegisterStartupScript(this.GetType(), "updateProgress", "updateProgress('" + updateProgress + "');", true);
<!--You can pass C# variables as parameters to the js function this way: '" + param + "'-->
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us