Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7647337
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T10:26:14+00:00 2026-05-31T10:26:14+00:00

I am working on an ASP.NET webforms page that has the following asp markup

  • 0

I am working on an ASP.NET webforms page that has the following asp markup (with additional controls stripped out):

<asp:UpdatePanel ID="updatePanel1" runat="server">
    <ContentTemplate>
        <asp:LinkButton ID="lnkbtnPreviousTop" OnClick="LinkButtonPrevious_Click"
            Text="Previous" runat="server">
        </asp:LinkButton>
    </ContentTemplate>
</asp:UpdatePanel>

Right now, if you click this LinkButton multiple times, the LinkButtonPrevious_Click event handler on the server side will fire as many times as the link was clicked. How can I make it so that the lnkbtnPreviousTop LinkButton is disabled after the first click, but the event handler still fires once and the UpdatePanel is refreshed?

I have tried adding this.disabled = true; to the OnClick attribute, but then the event handler code never gets hit.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T10:26:15+00:00Added an answer on May 31, 2026 at 10:26 am

    Just call the postback directly in the onclick, something like:

    lnkbtnPreviousTop.Attributes.Add("onclick", "this.disabled=true;" + Page.ClientScript.GetPostBackEventReference(lnkbtnPreviousTop, "").ToString());
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

A site that I'm working on has a ASP.NET webforms page that posts back
We have an ASP.NET 2.0 WebForms app that uses MS Ajax 1.0. It's working
I found user controls to be incredibly useful when working with ASP.NET webforms. By
I've been working in asp.net webforms and I've been making a UserControl that depends
I am working on an ASP.NET 4.0 web forms project that uses page routing
I am working on a page that has a mix of server side controls
I'm working on an ASP.NET WebForms CMS application, and having a bit of trouble
Good Morning, I'm working on an ASP.NET 3.5 webforms application and have written the
I've been working a lot with asp.net web forms and one think that I
After working with ASP.Net MVC, it has me thinking about Rails. I worked with

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.