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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T20:22:23+00:00 2026-05-22T20:22:23+00:00

In my windows app i have a button which is only visible when a

  • 0

In my windows app i have a button which is only visible when a user selects a certain value on a DropDownList.

For some reason the button does not work when i click on it.

I’ve enabled the button on page load and it works, however when i choose the value on the Dropdownlist the button does not work.

Is there something im missing here? any feedback would be greatly appreciated. Thanks

Code:

Protected Sub DropDownList4_SelectedIndexChanged(ByVal sender As Object, ByVal e As EventArgs) Handles DropDownList4.SelectedIndexChanged
    If DropDownList4.SelectedValue = "Yes" Then
        btnInsert.Visible = True
    Endif
End Sub

Protected Sub Button2_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnInsert.Click
    Response.Redirect("Menu.aspx")
    DropDownList4.SelectedValue = "Yes"
    txtfirstName.Text = ""
    txtSurname.Text = ""
    txtJobTitle.Text = ""
    txtCountry.Text = ""
    txtWork.Text = ""
    DropDownList7.SelectedValue = ""
End Sub
  • 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-22T20:22:24+00:00Added an answer on May 22, 2026 at 8:22 pm

    From what we can see from your provided code all you are doing is changing visibility. Are you disabling the button anywhere else? Also Check the properties of the button in the design view to ensure that you did not accidentally changed the Enabled property to “False”. It has been a while since I have done any web applications but if you are programically changing the enabled value of the button, I would suggest adding an Enabled = True line to your selected index change subroutine:

    If DropDownList4.SelectedValue = “Yes”
    Then
    btnInsert.Visible = True
    btnInsert.Enabled = True
    Endif

    It has been a while for me so I can’t remember if it is .Enabled or something else.

    There is also the possibility that you have a Panel or some such over your button and that is preventing you from actually clicking on the button.

    Also, put a break point on the first line of your button click event and make sure that you are not getting there as opposed to entering the code and it not running the way you expect.

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

Sidebar

Related Questions

I am developing a small windows app, but have some trouble deciding whether to
I have a .NET 2.0 windows forms app, which makes heavy use of the
Hi all: I have a Java Swing App. There is a button allow user
Hi all: I have a Java Swing App. There is a button allow user
I have an app in which I have a WebView where I display some
I have to perform 3 operations in a windows app as a Transaction. These
I've had a Windows app in production for a while now, and have it
I have a Windows Form app written in C#. Its job is to send
I have a Windows Forms app, that has a single ElementHost containing a WPF
I have a windows forms app with a textbox control that I want to

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.