Click here to Skip to main content
15,868,016 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi

In my application i am creating one user control.
I am not able to call java script function from user control code behind file.
Please tell me if you have any solution on it.

Thank in Advance.
Posted

 
Share this answer
 
Add the attributes with the javascript function name. It will work.

Syntax is:

btnExportToExcel.Attributes.Add("onclick", "alert('Alert you')");
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900