i want to add a variable a to the alert box.
how it should be done?
int a=10
string script = "window.onload = function() { alert('Is the highest vote!!'); }"; ClientScript.RegisterStartupScript(this.GetType(), "alert", script, true);
This way
int a = 10; string script = "window.onload = function() { alert('" + a.ToString() + "Is the highest vote!!'); }"; ClientScript.RegisterStartupScript(this.GetType(), "alert", script, true);
© COPYRIGHT 2025 ASPSnippets.com ALL RIGHTS RESERVED.