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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T02:32:13+00:00 2026-06-03T02:32:13+00:00

How to enable a disabled dropdown,textbox from cs file C# public void fill_name_selectedindexchanged(object sender,

  • 0

How to enable a disabled dropdown,textbox from cs file C#

 public void fill_name_selectedindexchanged(object sender, EventArgs ex)
{
    //txt_name.Enabled = true;
    ddl_title.Attributes.Add("enabled", "enabled");
    txt_full_name.Attributes.Add("enabled", "enabled");
    txt_login_name.Attributes.Add("enabled", "enabled");
    txt_email.Attributes.Add("enabled", "enabled");
    txtDefaultCompany.Attributes.Add("enabled", "enabled");

    //txt_name.Text = "";
    ddl_title.Items.Clear();
    txt_full_name.Text = "";
    txt_login_name.Text = "";
    txt_password.Text = "";
    txt_email.Text = "";
    AutoCompleteExtender1.ContextKey = ddl_user_type.SelectedValue.Trim();
    string val = ddl_user_type.SelectedValue;
    if (val.Trim() == "N")
    {
        ddl_title.Attributes.Add("enabled", "enabled");
        txt_full_name.Attributes.Add("enabled", "enabled");
        txt_login_name.Attributes.Add("enabled", "enabled");
        txt_email.Attributes.Add("enabled", "enabled");
        txtDefaultCompany.Attributes.Add("enabled", "enabled");
        txt_full_name.Text = "";
        txt_login_name.Text = "";
        txt_email.Text = "";
        mm.getlookup(ddl_title, "title", "u");
    }
}

The dropdown and the textbox remains disabled,it doesn’t change to enable.

  • 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-03T02:32:15+00:00Added an answer on June 3, 2026 at 2:32 am

    in addition to the ans given by Rody.
    i wanna add that u can put an attribute disabled and its value to disabled to disable but
    there is no attribute enabled. to enable an html input control you will have to remove the disabled attribute and not add an enabled attribute

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

Sidebar

Related Questions

I have a dropdown to display status, which can be Enabled(true) or Disabled(false). Here
I'm trying to re-enable the selected and disabled option from the drop-down list once
I want to enable all disabled commands in Emacs such as downcase-region - that
how to setup openssl at the mysql? have_ssl disabled; how to enable it? mysql>
How can I check with C# if the IIS6 compatibility role is enabled/disabled on
I have a Button on appwidget, that I need to 'enable'/'disable' programmatically from a
I am using a JQuery accordion style dropdown menu. However, when JS is disabled,
I have the following css settings: .dropdown dt { background:#e4dfcb !important; } .dropdown-disabled {
i see there is a disabled property on a specific item in the dropdown
I am new to jQuery and I want to enable and disable a dropdown

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.