ASP.Net Panel Not showing controls when another control has data

Posted on 2012-09-16
Last Modified: 2012-09-17
I have an page (ASP.Net 3.5, c# code-behind) with a panel on it. The panel has a few controls in it. 2 textboxes, a dropdownlist, a repeater and 4 buttons. The way I have it set up, when the repeater has rows, it is visible. If the repeater does not have rows, it is not visible. What happens is that when the repeater does have rows, the buttons all get knocked outside the panel. Everything still works functionally. When the repeater does not have rows and is thuus not visible, the buttons show up within the panel as designed. Any idea what is happening and how I can fix it? Thanks.
Question by:dodgerfan
    LVL 20

    Expert Comment

    Can you show us snapshots of what's happening wrong.

    When you say buttons get knocked outside the panel are they appearing in a new line?

    They should still be visible inside the panel markup i.e. div.
    LVL 13

    Accepted Solution

    Have u checked the buttons are inside the panel or outside or any html tag is not closed properly when the panel property is visible false else post the html code.
    LVL 23

    Assisted Solution

    by:Roopesh Reddy

    Try separating the control to different panels!

    Keep the Repeater control in one Panel and the buttons in other panel, so that it won't collide each other!

    If it still not solved, post the sample code!

    Hope it helps u...

    Author Closing Comment

    After separating things out (and taking a break from staring at the code), some of the html tags were not properly closed. It's all working as expected now. Thank.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Free Trending Threat Insights Every Day

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    Summary: Persistence is the capability of an application to store the state of objects and recover it when necessary. This article compares the two common types of serialization in aspects of data access, readability, and runtime cost. A ready-to…
    Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
    Need more eyes on your posted question? Go ahead and follow the quick steps in this video to learn how to Request Attention to your question. *Log into your Experts Exchange account *Find the question you want to Request Attention for *Go to the e…
    In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

    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

    13 Experts available now in Live!

    Get 1:1 Help Now