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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T23:23:39+00:00 2026-06-09T23:23:39+00:00

I have an Asp.net (Ver4) web page with an imageButton that is used to

  • 0

I have an Asp.net (Ver4) web page with an imageButton that is used to submit the form data to a database via the code behind of the imagebuttons click event. In the code behind I am using a response.redirect to move them to a thank you page, it is the last line in the code behind routine.
Due to the DB being a little slow sometimes I want to disable the click event until the page is redirected. I am attempting to do this with jquery. I have been able to disable the button and make it appear disabled but then my code behind is not firing at all.

This is the JQuery I am using

function test() {
    $("#ImageButton1").attr("disabled", "disabled").css('opacity',' 0.5');
}

This is the aspx code for the button

<div class="button">
      <asp:ImageButton ID="ImageButton1" runat="server" Height="28px"
           OnClientClick="test();"
           onclick="ImageButton1_Click" 
           ImageUrl="media/finishbutton.jpg" 
           style="margin-top: 0px" Width="97px" />
</div>
  • 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-09T23:23:40+00:00Added an answer on June 9, 2026 at 11:23 pm

    The easiest solution is to disable the element a little bit later after the click event has triggered. For example:

     function test() {
        setTimeout(function () { $("#<%=ImageButton1.ClientID %>").attr("disabled", "disabled").css('opacity', ' 0.5'); }, 10);
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have ASP.NET page, it calls webservice via $.ajax and returns result in json
I have asp.net(c#) web form with html input text(first name) how i can check
I have asp.net mvc intranet site that is deployed to IIS6. Site is used
i have asp.net page that is opened inside an iframe. How to redirect to
I have asp.net form that contains fields. When I access this window, my javascript
I have asp.net mvc web site. When i want to change some code in
I have asp.net's .aspx page. that have GridView let say GridViewParent and Each row
I have Asp.net application that implemented with Dynamic Data technology. All data from my
I have asp.net checkboxlist control that bounded to a data source so the number
I have asp.net mvc 4 web application project on my server in IIS Directory.

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.