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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T11:51:01+00:00 2026-06-01T11:51:01+00:00

I have an asp wizard on my page with three steps. <asp:Wizard ID=wizardBestellen runat=server

  • 0

I have an asp wizard on my page with three steps.

<asp:Wizard ID="wizardBestellen" runat="server" ActiveStepIndex="0" DisplaySideBar="False" onfinishbuttonclick="wizard_NextButtonClick" onnextbuttonclick="wizard_NextButtonClick" onpreviousbuttonclick="wizard_PreviousButtonClick">
          <StartNavigationTemplate></StartNavigationTemplate>
          <StepNavigationTemplate></StepNavigationTemplate>
          <FinishNavigationTemplate></FinishNavigationTemplate>
          <WizardSteps>
            <asp:WizardStep runat="server" ID="step1" StepType="Start">
              <uc1:control ID="uc1" runat="server" />
            </asp:WizardStep>
            <asp:WizardStep runat="server"ID="step2" StepType="Step">
              <uc2:control ID="uc2" runat="server" />
            </asp:WizardStep>
            <asp:WizardStep ID="step3" runat="server" StepType="Finish">
              <uc3:control ID="uc3" runat="server" />
            </asp:WizardStep>
          </WizardSteps>
        </asp:Wizard>

Now every control has a next and a previous button which after the click validates your data and sends you to the next step. The buttons all look like:

<asp:LinkButton ID="bntPrevious" runat="server" CommandName="MovePrevious" CssClass="buttonOrange" CausesValidation="false"><span>Previous</span></asp:LinkButton>
<asp:LinkButton ID="btnNext" runat="server" CommandName="MoveNext" CssClass="buttonOrange" CausesValidation="true"><span>Next</span></asp:LinkButton>

So far it all works perfectly..
Now i wanted to disable the buttons after clicking on it and show a div with a loader image. So i created a div named divLoader and a javascript function which hides the div the buttons are in and shows the div with the loader.

function ToggleDiv(divButton, divLabel)
{

        if (divButton.style.display == 'block')
        {
            divButton.style.display = 'none';
            divLabel.style.display = 'block';
        }
        else
        {
            divButton.style.display = 'block';
            divLabel.style.display = 'none';
        }
}

But i can’t get this to work. The ToggleDiv function works great in another situation, so thats not the problem.
I’ve tried calling the function from the OnClick attribute in the linkbutton but this gave me an error. I tried the OnClientClick, but this didn’t work and i also tried setting the onclick attribute in the code behind, this also was a dead end.

Can anybody explain to me what i am doing wrong or is there another way to prevent users clicking the button twice?

  • 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-01T11:51:02+00:00Added an answer on June 1, 2026 at 11:51 am

    Sounds like you’re not getting the binding to work.

    The first thing I would do is check the emitted control IDs by doing a view-source. Some implementation of the .NET framework add extra fluff to these control IDs, so can’t guarantee that it will be the same as appears on the form.

    Next, I would try some JavaScript late binding. If you have a JavaScript file, put it there. If not create one or add a JavaScript block to the foot of your form (create a new file for preference).

    All this would be much easier with a JAvaScript lbrary such as jQuery, but for the moment lets assume you don’t have one.

    Add a window onload event handler

    window.onload = function(){
        //code to go here
    }
    

    Now add the click binding for your button:

    window.onload = function(){
        document.getElementById("***YOUR BUTTON ID***").onclick = function(){
            ToggleDiv(this, document.getElementById("***YOUR LABEL ID***"));
        }
    }
    

    I said this would be a little easer with jQuery, well, this is the equivalent implementation:

    $(document).ready(function(){
        $("#***YOUR BUTTON ID***").click(function(){
            $(this).toggle();
            $("#***YOUR LABEL ID***")).toggle();
        });
    });
    

    The above sample removes the need for your ToggleDiv function entirely.

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

Sidebar

Related Questions

I have an ASP page with the following repeater: <asp:Repeater runat=server ID=RegionRepeater DataSourceID=SqlDataSourceRegions EnableViewState=true>
i have wizard control with multiple steps. something like this <asp:wizard> <wizardsteps> </wizardsteps> <wizardsteps>
I have a ASP.Net create user wizard. One of the additional steps I included
I have an ASP.NET page with a Wizard control containing several pages of form
I have an asp.net page having a wizard control. I wanted to make visible
I have dropped a wizard control on the index page of an asp.net mvc
I have an ASP.NET form with multiple steps (using the Wizard control). When advancing
Using Asp.Net MVC3, I have many steps in a wizard where after every step
I have an asp:wizard control that contains five WizardSteps. All of these steps have
I have a asp:Wizard control on a site running Framework 3.5. I acquired the

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.