Page_Load when using OnClientClick

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?
Ra Carter [ Do, 31 Januar 2008 18:31 ] [ ID #1920747 ]
Microsoft » microsoft.public.dotnet.framework.aspnet » Page_Load when using OnClientClick

Vorheriges Thema: DAL Question: SqlConnection vs SqlDataSource
Nächstes Thema: Writing to Favorites (IE) from aspnet