ASP.Net用户界面问题与文本框 [英] ASP.Net User interface issue with textbox

查看:83
本文介绍了ASP.Net用户界面问题与文本框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我正在尝试更新现有的asp.net页面并添加了一个文本框来捕获字段到SQL。



当我尝试构建应用程序时,添加文本框后会出现以下内容:



错误BC30451:名称'TextBox4'是没有声明。



我写的代码中没有错误但是由于某种原因这种情况不断出现。我没有重复的页面,并检查文本框是否被引用到正确的页面。



有没有人知道为什么会发生这种情况以及解决方案是什么解决这个问题?



谢谢。

解决方案

检查中的文本框的ID页面的设计者类。我确信没有在那里声明具有该ID的文本框实例。在设计器类中添加带有相应ID的文本框,它将解决您的问题。



通常在应用程序运行时尝试添加控件时会发生这种情况

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.

解决方案

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.


这篇关于ASP.Net用户界面问题与文本框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆