[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Panel is not recognized in code behind

Posted on 2007-12-05
2
Medium Priority
?
282 Views
Last Modified: 2013-12-16
In ASP.NET 2.0 with C# I have a strange error.
I decalre 2 panels in my page.
One panel I declare and then in the code behind I write
Panel1.visible = false;
I declare a second panel  'pnlbreadcr' and when I turn to it in the code behind it is recognized but I get the following error:
The name 'pnlbreadcr' does not exist in the current context      
I don't understand what is the problem. please help
Anat
0
Comment
Question by:ANAT2403
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 9

Accepted Solution

by:
sognoct earned 2000 total points
ID: 20409685
0
 
LVL 12

Expert Comment

by:Munawar Hussain
ID: 20409825
if you are using VS 2005 then you dont need to put definition yourself
like this
 protected System.Web.UI.WebControls.Panel pnlDescription;
but in VS 2003 (1.1) you need that.

BUT YOU MAY HAVE VISIBILITY ISSUE?
If you have put panels on a form and in form load they are set to visible=false or at the time of adding to form their visible porperty is set of false then you will not be able to access then in code for further use because controls with visible=false are not rendered in resultant HTML page (HTML is not genereated for them).

you may use a style sheet to set visibility false and true .. hope that would work for you.

Thanks
0

Featured Post

Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

Question has a verified solution.

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

IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…

649 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