I have a piece of code
<div class="class1">
<span>testing</span>
</div>
I will change this into html server control.
<div class="class1" id="div1" runat="server">
<span>testing</span>
</div>
I want to add a click event.
<div class="class1" id="div1" runat="server" onclick="Test_Click">
<span>testing</span>
</div>
On code behind, I have that event handler.
protected void Test_Click(object sernder, EventArgs e)
{
//code
}
But it is not working.. I tried by changing onclick
to onserverclick
. it is still not working..
Any other way?