Click here to Skip to main content
15,919,423 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How to fire button click event from java script in asp.net
Posted

1 solution

in ASP Button tag
ASP.NET
<asp:button id="Btnfire" onclick="javascript:firejsfunction()" xmlns:asp="#unknown" />

in script
HTML
firejsfunction()
{
alert("you are firing the javascript");
write your code here.
 }
 
Share this answer
 
v2
Comments
vvsnmurty 2-Aug-12 5:32am    
i got

$('#<%=button.ClientID%>').trigger('click');
prashant patil 4987 10-Jan-13 23:04pm    
hmmm good.
Unareshraju 2-Aug-12 6:00am    
good vvsnmurthy, keep it up

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