Solved

Dropdown property is not set correctly in ASP.NET page

Posted on 2013-11-28
5
80 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
  • 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Recursive Folder Upload via Web 5 79
How to convert Access database to a web app? 3 1,101
IIS: Multiple user recognition behid one IP 2 75
Grunt script for Build Process 1 42
What is Node.js? Node.js is a server side scripting language much like PHP or ASP but is used to implement the complete package of HTTP webserver and application framework. The difference is that Node.js’s execution engine is asynchronous and event…
It’s a strangely common occurrence that when you send someone their login details for a system, they can’t get in. This article will help you understand why it happens, and what you can do about it.
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.
Learn how to set-up custom confirmation messages to users who complete your Wufoo form. Include inputs from fields in your form, webpage redirects, and more with Wufoo’s confirmation options.

809 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