Solved

DropDownList inside UpdatePanel won't show

Posted on 2011-09-20
6
348 Views
Last Modified: 2012-05-12
I have a dropdownlist inside an update-panel,

It's visible property is set to false and then I change it to true later but it will not show the dropdown?
<tr id="trTopics" runat="server" visible="false" >
	        <td colspan="3" class="PSRFItem">
		        <asp:UpdatePanel ID="updTopics" runat="server" >
			        <ContentTemplate>
				        <asp:Label ID="lblTopicError" runat="server" Visible="false" ForeColor="Red" CssClass="PIFErrorMessage" Text="You must specify the speakers intended topic." /><br />
				        <span style="color: Red; font-weight:bold; font-size: 18px;">*</span>
				        <asp:Label ID="lblTopic" runat="server" Text="What Topic would you like the speaker to present?" /><br />
				        <asp:DropDownList ID="ddlTopics" runat="server" AutoPostBack="True" />
			        </ContentTemplate>
		        </asp:UpdatePanel>
	        </td>
        </tr>

Open in new window

0
Comment
Question by:meiprogram
  • 3
  • 2
6 Comments
 
LVL 7

Expert Comment

by:Slimfinger
ID: 36571754
From your code it looks like its 'Visible' property is NOT set to false, though the enclosing table's visibility is false.  Not sure if you noticed this or not, but if you are simply setting the DropDownList visibility to true it won't matter.
0
 
LVL 9

Expert Comment

by:jkofte
ID: 36572491
the problem is with your tr tag. it is the parent to the dropdownlist, so when it is not visible, everything inside it will not be visible.

change

<tr id="trTopics" runat="server" visible="false" >

Open in new window


to

<tr id="trTopics" runat="server">

Open in new window

0
 

Author Comment

by:meiprogram
ID: 36573765
I know it will work if I take the visible out of the tr tag.  I need to hide that row and show it only in certain cases depending on the users input on other controls
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

Accepted Solution

by:
meiprogram earned 0 total points
ID: 36574100
I figured it out.

I had a drop-down-list that was depending on the user selection would show the tr tag.  I had this control in an update-panel as well, once I removed that update-panel all worked.
0
 

Author Closing Comment

by:meiprogram
ID: 36597744
Figured it out myself.
0
 
LVL 7

Expert Comment

by:Slimfinger
ID: 36576031
Obviously users will not be able to make it visible again via the list.

Btw, your original problem description was inaccurate.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
This article discusses the ASP.NET AJAX ModalPopupExtender control. In this article we will show how to use the ModalPopupExtender control, how to display/show/call the ASP.NET AJAX ModalPopupExtender control from javascript, how to show/display/cal…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

863 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now