Solved

DropDownList inside UpdatePanel won't show

Posted on 2011-09-20
6
347 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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 

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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

In an ASP.NET application, I faced some technical problems. In this article, I list them out and show the solutions that I found.  I hope it will be useful. Problem: After closing a pop-up window, the parent page should be refreshed automaticall…
Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

759 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

23 Experts available now in Live!

Get 1:1 Help Now