ensuring that all declared controls have been drawn

D

David

Is there a way to make sure that all the declared controls in the
declaration block of my ASP.NET class?

So say, I have a textbox control declared.
protected System.Web.UI.WebControls.TextBox TextBox1;

Then say the control gets deleted. VS.NET does not always get rid of the
declaration, and then when a piece of code that refers to the control runs,
I get a null reference error message.

So is there a way to run some kind of validation check to make sure all the
declared controls have been drawn?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,049
Latest member
Allen00Reed

Latest Threads

Top