View Single Post
  #2 (permalink)  
Old July 24th, 2007, 02:45 AM
mike_remember mike_remember is offline
Friend of Wrox
Points: 1,903, Level: 17
Points: 1,903, Level: 17 Points: 1,903, Level: 17 Points: 1,903, Level: 17
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2004
Location: , , India.
Posts: 547
Thanks: 0
Thanked 1 Time in 1 Post
Default

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.
Reply With Quote