Disappearing Controls

    Date: 01/24/05 (Asp Dot Net)    Keywords: asp, web

    Can anyone tell me what the hell VS.NET's problem is that half the time it won't recognize controls if they are inside tables?

    I have the following snippet in my .aspx page:

    
      
      
        This account is currently on stop.  Override or Delete?
        
        
      
      
        Reason for deletion:
        
        
        
      
    
    


    This fits with the codebehind declarations:
    Protected WithEvents btnOverride As System.Web.UI.WebControls.Button
    Protected WithEvents btnDelete As System.Web.UI.WebControls.Button
    Protected WithEvents btnContinue As System.Web.UI.WebControls.Button
    Protected WithEvents btnCancel As System.Web.UI.WebControls.Button
    Protected WithEvents lblMessage As System.Web.UI.WebControls.Label
    Protected WithEvents txtReason As System.Web.UI.WebControls.TextBox
    Protected WithEvents pnlStop As System.Web.UI.WebControls.Panel
    Protected WithEvents pnlReason As System.Web.UI.WebControls.Panel
    


    So how come when I try to set "pnlStop.Visible = True", it works fine, but when I set "pnlReason.Visible = True", I get "Object reference not set to an instance of an object"? What is the difference between the two?

    Source: http://www.livejournal.com/community/aspdotnet/25049.html

« determine event raised in... || VisualStudio.net and CVS »


antivirus | apache | asp | blogging | browser | bugtracking | cms | crm | css | database | ebay | ecommerce | google | hosting | html | java | jsp | linux | microsoft | mysql | offshore | offshoring | oscommerce | php | postgresql | programming | rss | security | seo | shopping | software | spam | spyware | sql | technology | templates | tracker | virus | web | xml | yahoo | home