div not showing up

Posted on 2011-10-17
Last Modified: 2012-06-21
on another click event, I am setting the div id " lnk" to visible = true but not showing...anyone can help me why?

 <div style="border: 1px solid silver; height: 300px; min-height: 300px; width: 100%;">
                 <div ID="lnk" runat="server"  visible="false">
                     <asp:LinkButton ID="lbtnAttach" runat="server" OnClick="lbtnAttach_Click">Download Attachment</asp:LinkButton>
                        <asp:DetailsView runat="server" ID="DetailsView1" AutoGenerateRows="False"

Question by:1jaws

    Expert Comment

    YOu have Div inside div, it will nwvwer work fine

    Author Comment

    I have tried panel inside the div, still didnt work...

    Author Comment

    I got rid of all the div's and since this whole thing inside the radpane.. still not showing.. is there anyway to make that visible?

    Accepted Solution

    I used javascript dopostback function to solve the problem

    Author Closing Comment

    Had to use javascript doPostback () function..
    LVL 9

    Expert Comment

    if you make visibility as will not visible inside html source....

    so instead of that use javascript to set the visibility hide / Show.

    on client click set javascript function call and inside javascript set

    To show:

    document.getelementbyid("your object name").style.display=''

    to hide

    document.getelementbyid("your object name").style.display='none'

    Featured Post

    Find Ransomware Secrets With All-Source Analysis

    Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

    Join & Write a Comment

    Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
    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!
    Here's a very brief overview of the methods PRTG Network Monitor ( offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
    This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor ( If you're looking for how to monitor bandwidth using netflow or packet s…

    728 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

    15 Experts available now in Live!

    Get 1:1 Help Now