Solved

Dropdown property is not set correctly in ASP.NET page

Posted on 2013-11-28
5
82 Views
Last Modified: 2014-05-05
The Visible property of a drop-down box is not set correctly in the following line of code:
drpRootCauses.Visible = True

After this line of code, the Visible property is still false, when watched using a breakpoint.
0
Comment
Question by:shanthi_joseph
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
5 Comments
 
LVL 43

Expert Comment

by:Rob
ID: 39686330
Please post the code your are using to define the drop-down box.  You may also be trying to set this before the control has loaded in which case it wouldn't work.
Please also post the code around you trying to set the Visible property
0
 

Author Comment

by:shanthi_joseph
ID: 39688729
The drpRootCauses Visible property is not set correctly. The drpRootCauses Visible property still remains False when the breakpoint is set after this line of code.  Please refer to attachment.

Here is the code that is used to define and use the drop down box:

Protected WithEvents drpRootCauses As System.Web.UI.WebControls.DropDownList

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
.
.
.

            drpRootCauses.Visible = True

            Dim Reader4 As SqlDataReader = sqlGetRootCause.ExecuteReader

            Dim lstNew2 As New ListItem
            lstNew2.Text = ""
            lstNew2.Value = ""
            drpRootCauses.Items.Add(lstNew2)

            While Reader4.Read()
                Dim lstNew3 As New ListItem
                lstNew3.Text = Reader4.Item(0)
                lstNew3.Value = Reader4.Item(0)
                drpRootCauses.Items.Add(lstNew3)
            End While
            Reader4.Close()
drpdownPropertyNotSet.bmp
0
 

Author Comment

by:shanthi_joseph
ID: 39689048
There is another property namely divRootCause.Visible that was set to False. The divRootCause tag contains the drpRootCause drop down. The problem was fixed when I set both the Visible property of the div and drop down control to True.
0
 

Accepted Solution

by:
shanthi_joseph earned 0 total points
ID: 40033836
I do not require a solution to this problem.
0
 

Author Closing Comment

by:shanthi_joseph
ID: 40041606
I do not require a solution to this problem.
0

Featured Post

Webinar: Aligning, Automating, Winning

Join Dan Russo, Senior Manager of Operations Intelligence, for an in-depth discussion on how Dealertrack, leading provider of integrated digital solutions for the automotive industry, transformed their DevOps processes to increase collaboration and move with greater velocity.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Internet Explorer 11 Application Crash 6 62
Microservices Architecture 12 182
Redirect HTTP to HTTPS in Azure 4 79
Unwanted Popup 8 297
      Install BugTracker on Windows 2008 server Step 1:  Install windows 2008 server 32 bit OS and configure IIS. Step 2:  Install SQL server ( SQL server 2005 or SQL server 2005 Express edition. The installer for 2008  version isn’t very f…
Introduction A frequently used term in Object-Oriented design is "SOLID" which is a mnemonic acronym that covers five principles of OO design.  These principles do not stand alone; there is interplay among them.  And they are not laws, merely princ…
Wufoo.com provides powerful tools for surveying targeted groups, and utilizing data from completed surveys to find trends, discover areas of demand or customer expectation, and make business decisions on products or services.
Use Wufoo, an online form creation tool, to make powerful forms. Learn how to choose which pages of your form are visible to your users based on their inputs. The page rules feature provides you with an opportunity to create if:then statements for y…

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question