Answer: Suppose,we have a Javascript function as below:-
<script type="text/javascript">
function alert_msg()
{
alert("Vishal Kumar");
}
</script>
To call above function from Code behind,write below code in any button click:-
ScriptManager.RegisterStartupScript(Page, typeof(Page), "message", "javascript:alert_msg();", true);
Asked In: Many Interviews |
Alert Moderator