Take the 2-minute tour ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

On click on button function are not getting fired. Why this is happening.

<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>

<asp:UpdateProgress ID="UpdateProgress1" runat="server"
                    AssociatedUpdatePanelID="UpdatePanel1">
    <ProgressTemplate>
        <asp:Image ID="Image1" runat="server" 
                   ImageUrl="~/images/ajax-progress.gif"
                   />
                <br />
                Please Wait. This will take few minutes.
    </ProgressTemplate>
</asp:UpdateProgress>

<asp:UpdatePanel ID="UpdatePanel1" runat="server">
    <ContentTemplate>
        <asp:Button ID="btnUpdate" runat="server" 
                    Text="Update" 
                    onclick="btnUpdate_Click" 
                    Width="100px" />
    </ContentTemplate>
</asp:UpdatePanel>

code behind :

protected void btnUpdate_Click(object sender, EventArgs e)
{        
    trunc();
    ConsumerUpld(FileUpload1);     
}

ConsumerUpld(fileupld) function updates table in database

share|improve this question
add comment

1 Answer

Everything seam fine, so I tested your code by replacing it by a btnUpdate.Text = "updated";

protected void btnUpdate_Click(object sender, EventArgs e)
{
    btnUpdate.Text = "updated";
    //trunc();
    //ConsumerUpld(FileUpload1);
}

Everything run smoothly, so your problems is within one of the 2 functions you call.

When an error occurs during an async postback, it show on the button of the browser page (the way it show depend of your browser). You should try to debug it with breakpoints or comment out the update panel to see what is happening.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.