I need to call an ASP.NET function which takes one input parameter, from Javascript.
I have been able to call an ASP.NET function function1() with no input parameter, from Javascript like this.
"javaScript:myJS(" + Button1.ClientID + ");"
But the function1() is supposed to have an input parameter - function1(string arg0). How do I call function1(string arg0) then because I can't send the parameter 'arg0' to the button click event handler? Thanks.
<script type="text/javascript">
function myJS(myVar)
{
document.getElementById(myVar).click();
return false;
}
</script>
protected void Button1_Click(object sender, EventArgs e)
{
function1();
}