Well, there can be 2 types of click event, server side click and client side click event. To understand better, just paste the below HTML to your aspx page:
<table cellSpacing="0" cellPadding="0" width="100%">
<tr>
<td><A runat=server href="#" onserverclick="btnsubmit_ServerClick">Server Side Click</A></td>
</tr>
<tr>
<td><input id="btnsubmit" type="submit" value="Server Query" runat="server"></td>
</tr>
<tr>
<td><A href="#" onclick="document.getElementById('btn').onclick()" >Client Side Click</A></td>
</tr>
<tr>
<td><input id="btn" type="button" value="Client Query" onclick="alert('Client Test')"></td>
</tr>
</table>
And on the server side click of "Server Button", write the following in .cs
protected void btnsubmit_ServerClick(object sender, System.EventArgs e)
{
Response.Write("BUtton click");
}
Regards
Mike
Don't expect too much, too soon.
|