Conditionally display Confirm Button

I am going to hook up a Submit button on one of my pages to the ConfirmButtonExtender.  This is fairly straightforward - however, I want to only display this Confirm Button if a certain value is selected in a DropDownList, otherwise I just want the submit to happen with no message.  Any ideas?
RAFUserAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

sm394Commented:
something like that

<asp:DropDownList ID="DropDownList1" AutoPostBack="true" runat="server" OnSelectedIndexChanged="DropDownList1_SelectedIndexChanged">
                <asp:ListItem Text="Enabled">
                </asp:ListItem>
                <asp:ListItem Text="Disabled">
                </asp:ListItem>
            </asp:DropDownList>
            <asp:Button ID="btnSubmit" Visible="false" runat="server" Text="submit" />


===code behind
 protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (DropDownList1.SelectedValue.Equals("Enabled"))
            {
                btnSubmit.Visible = true;
            }
            else
            {
                btnSubmit.Visible = false;
            }
        }
    }
0
RAFUserAuthor Commented:
Sorry, I think I mistyped what I want.

I want to only show the confirm message if a particular item in my DropDownList is selected.
0
prairiedogCommented:
You can put the droptdownlist, button, and the confirmbuttonextender in a UdpatePanel, then set ddl's autopost=True, then in the code-behind, the ddl's SelectedIndexChanged event handler, if the selectedValue is the value that requires no confirmation, then just set confirmbuttonextender.enabled = false, otherwise set it to Ture.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
RAFUserAuthor Commented:
Prairie,
I am a beginner with AJAX in general, and haven't worked with an UpdatePanel before.  I will try your suggestion.
0
prairiedogCommented:
Just let me know if you have trouble with it and need some examples.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ASP.NET

From novice to tech pro — start learning today.