You must Sign In to post a response.

Button click event not fire at first time i click

I have a web form that uses a Save button (see below) to save data. When I open the page and enter data and click on the Save button the page refreshes (as in a post back) but it doesn't save the changes. I don't get any error messages either. If I click it a second time it saves the data. I've tried all methods of debugging I can think of, but I can't find the problem. The click event doesn't appear to fire the first time, but it does fire the second time. Any idea what the problem is?

<asp:linkbutton id="SaveButton" text="Save" OnClick="SaveButton_Click" runat="server"/>


Author: Abhay Kumar Raut27 Aug 2009 Member Level: Gold   Points : 2

Hi dhaval,

It is very difficult to figure out what's the issue by guessing .It is returning false on first click.Do one thing change it to asp button and check..

Author: Praveen27 Aug 2009 Member Level: Bronze   Points : 2


Check the Page Tag


the above might set to false change to true

it should look like

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default9.aspx.cs" Inherits="Default9" %>

hope that will give you an idea

Sign In to post your comments