Click here to Skip to main content
15,886,110 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
ASP.NET
<div id="div1"  runat="server">
1
</div>

how To Use Onclick? note:Onclick For CodeBehind C# and Not For JavaScript
Thanks
Posted

Yes, you can handle the click event on a DIV. Refer the similar thread:
How Mapping Server Click Event The DIV HTML Element?[^]


--Amit
 
Share this answer
 
Comments
__TR__ 29-Aug-12 8:54am    
my 5.
_Amy 29-Aug-12 9:32am    
Thank you. :)
The codeBehind code can be invoked by js, for example:
JavaScript
<script language=javascript>
var a = "<%=CodeBehind()%>";
</script>
 
Share this answer
 
v2
Comments
Seyed Ahmad Mirzaee 29-Aug-12 10:38am    
Its CodeBehind() call When Page Load
I want When Div Click Call.
Thanks

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