R
Ra Carter
i have a standard html button in my ascx control in asp.net 2.0 using
this syntax:
<input type="button" onclick="javascript:somefunction()"; />
for some reason clicking this button causes a server side event
(OnInit for example) with IsPostBack == false. i also tried using this
syntax to create the button:
<asp:Button ID="x" runat="server" CssClass="viewbutton"
OnClientClick="somefunction()" UseSubmitBehavior="false"/>
this also causes the server side event. my questions are:
1. why does server side code run when clicking this button
2. why is IsPostBack equal to false?
3. how do i prevent the server side events?
this syntax:
<input type="button" onclick="javascript:somefunction()"; />
for some reason clicking this button causes a server side event
(OnInit for example) with IsPostBack == false. i also tried using this
syntax to create the button:
<asp:Button ID="x" runat="server" CssClass="viewbutton"
OnClientClick="somefunction()" UseSubmitBehavior="false"/>
this also causes the server side event. my questions are:
1. why does server side code run when clicking this button
2. why is IsPostBack equal to false?
3. how do i prevent the server side events?