Welcome to Dream.In.Code
Getting Help is Easy!

Join 136,237 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 2,249 people online right now. Registration is fast and FREE... Join Now!




Disable/Enable Dropdownlist

 
Reply to this topicStart new topic

Disable/Enable Dropdownlist, Disable One Dropdownlist from another

hostilenvironment
13 Oct, 2008 - 07:45 PM
Post #1

New D.I.C Head
*

Joined: 16 Sep, 2008
Posts: 3

Iam a beginner with c#. And I am trying to disable a dropdownlist if one of two dropdownlist are selected on a web page. Is this possible

CODE

protected void btnCalculate_Click(object sender, EventArgs e)
    {
        if (cboStudentStatus)
        {
            cboFcc.Enabled = false;
        }

User is offlineProfile CardPM
+Quote Post

gbertoli3
RE: Disable/Enable Dropdownlist
13 Oct, 2008 - 08:05 PM
Post #2

DIC at Heart + Code
Group Icon

Joined: 23 Jun, 2008
Posts: 1,046



Thanked: 17 times
Dream Kudos: 950
My Contributions
What do you mean:
QUOTE
on a web page


Is this ASP.NET?

If you are talking about a Windows Forms Application, then it is simple
csharp

if (comboBox1.SelectedText != "" | comboBox1.SelectedText != null)
{
comboBox2.Enabled = true;
}
else
{
comboBox2.Enabled = false;
}

User is offlineProfile CardPM
+Quote Post

PsychoCoder
RE: Disable/Enable Dropdownlist
13 Oct, 2008 - 08:09 PM
Post #3

using DIC.Core;
Group Icon

Joined: 26 Jul, 2007
Posts: 8,983



Thanked: 125 times
Dream Kudos: 8625
Expert In: VB, VB.Net, C#, SQL, ASP, ASP.Net, Web Development, HTML, CSS, Win32 API, Javascript, mySQL, J#, Boo.Net

My Contributions
Moved to ASP.NET smile.gif
User is offlineProfile CardPM
+Quote Post

hostilenvironment
RE: Disable/Enable Dropdownlist
14 Oct, 2008 - 06:50 AM
Post #4

New D.I.C Head
*

Joined: 16 Sep, 2008
Posts: 3

QUOTE(gbertoli3 @ 13 Oct, 2008 - 09:05 PM) *

What do you mean:
QUOTE
on a web page


Is this ASP.NET?

If you are talking about a Windows Forms Application, then it is simple
csharp

if (comboBox1.SelectedText != "" | comboBox1.SelectedText != null)
{
comboBox2.Enabled = true;
}
else
{
comboBox2.Enabled = false;
}



User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 12/2/08 03:38AM

Live Help!

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month