Click here to Skip to main content
15,897,704 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I am trying to update an existing asp.net page and have added a textbox to capture a field to SQL.

When i try to build the application the following comes up after adding the textbox:

error BC30451: Name 'TextBox4' is not declared.

there is no errors in the code I have written but this keeps popping up for some reason. I have no duplicate pages and have checked that the textbox is being refered to the correct page.

Does anyone have an idea as to why this happens and what is a solution to remedy this issue?

thanks.
Posted
Comments
mprakash12 18-Oct-13 4:44am    
did your website is web application or web site?
Zafar Sultan 18-Oct-13 5:24am    
Try deleting the textbox and add it again from toolbox with same ID.

1 solution

Check for the ID of the text box in the designer class of the page. I am sure that the Text box instance with that ID is not declared there. Add the text box with your respective ID in the designer class and it will solve your problem.

This happens usually when you tries to add the control when the application is running.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900