I have two JavaScript functions with same name but different function definition (one is parameter less and other one with two parameters). When I try to invoke parameter less function from code-behind, it always call parameterized function. But when i remove paramterized function then the function with no parameters is getting invoked. I want to know why this happening:
e.g;
<script>
function A()
{
alert(1);
}
function A(param1 , param2)
{
alert(2);
}
</script>
from code-behind:
Page.ClientScript.RegisterStartupScript(this.GetType(), "CallMyFunction", "A()", true);
Result: aler(2);