When we click a button on webform it shows java script which function is used to show thisthanks friends ambica kiran kumar.majji

Showing Answers 1 - 1 of 1 Answers

Guest

  • Oct 25th, 2006
 

Hi,

You can write any javascript function in the html page and call that function in the button attribute in code-behind. For eg. in html page, you can write the function as follows:

<script language="javascript">

function sayhello()

{ alert("Hello") }

</script>

In the code behind, on the PageLoad Event, you can call this function as follows:

Button1.Attributes.Add("OnClick","javascript:return sayhello()"; );

Hope this helps

Raja Raman

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions