Search
 
SCRIPT & CODE EXAMPLE
 

HTML

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 + "'-->
Comment

PREVIOUS NEXT
Code Example
Html :: card decks bootstrap 4.5 
Html :: change bootstrap background color 
Html :: Hide overflow for Absolute images 
Html :: show image only on md screen 
Html :: html to png node 
Html :: link to middle of page 
Html :: how to add see button in password input in html 
Html :: make all the content of body in center in html 
Html :: h1 alert 
Html :: span tag 
Html :: html frame 
Html :: include javascript in html 
Html :: message box html 
Html :: mat-tab height 100 
Html :: bootstrap v5 tooltip 
Html :: onclick in php html 
Html :: number input with any value and range 
Html :: python script in html file 
Html :: navigation menu 
Html :: display observable in html angular 
Html :: s9 berlin 
Html :: skiing in winter 
Html :: textbox readonly 
Html :: code for dropdown in html 
Html :: get all values in hidden field with the same name 
Html :: liveweaver 
Html :: x and y in javascript 
Html :: brackeys C# 
Html :: embed live crypto transactions map across multiple wallets and exchanges 
Html :: border corner frames image css 
ADD CONTENT
Topic
Content
Source link
Name
2+3 =