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 8259897
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T02:58:02+00:00 2026-06-08T02:58:02+00:00

I have a asp.net button control. My requirement is such that upon clicking the

  • 0

I have a asp.net button control. My requirement is such that upon clicking the button, it should be disabled and fire a server side event simultaneously. I am disabling the button by

onclientclick = "this.disabled = true;"

and calling the server side method by

onclick = "someserversidemethod"

But the thing is that button is getting disabled and not firing the server side event. I want both client side and server side events to fire simultaneously. Please help.

  • 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-06-08T02:58:03+00:00Added an answer on June 8, 2026 at 2:58 am

    Keep what you have and also set the property UseSubmitBehavior="false". This will force the button to use the asp.net postback mechanism, rather than the inbuilt browser mechanism.

    See here for more details

    EDIT

    Browsers as standard will always submit a form when you click on a <input type="submit"> control (which is what is rendered to the HTML when you use a <asp:Button>). ASP.NET uses this feature to initiate the postback to the server.

    The problem you have is that if the button is disabled (like you are doing in your javascript) then the browser will not submit the form (i.e. the postback will not happen).

    By using the attribute UseSubmitBehavior="false" you are telling ASP.NET to ignore the fact that browsers can do the submit themselves, and instead the button should use the JavaScript postback methods provided by ASP.NET (the same methods that are used on AutoPostback="true" for things like <asp:Checkbox> etc).

    The javascript postback ignores the fact that you have just set the control as disabled,meaning the control will be disabled on screen but the postback will still happen.

    I hope that makes sense

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an ASP.NET form (C#) but which I click this button that should
For the following scenario: I have an ASP.NET FileUpload control and a Button that
I have an asp.net control, which seems to fire the button click event handler
I have an asp.net button control on the page. <asp:Button ID=btnFinishReceiving runat=server Text=Finished Receiving
I have an ASP.NET control that outputs a button to the screen and I
I have an asp.net server control (with the asp: in its definition). The button
I have an asp.net page. There is a button Edit on the bottom that
i have a dropdownlist (asp.net control) and a listbox control and a Add button
I have an ASP.NET user control that contains a textbox which has an AJAX
I have an ASP.NET page which has an asp.net button control in it. When

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.