获取错误当前上下文中不存在名称textbox1 [英] Getting error The name textbox1 does not exist in the current context

查看:605
本文介绍了获取错误当前上下文中不存在名称textbox1的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的项目中,我必须为一个页面(aspx)创建一个重复页面。所以我复制了整个页面(aspx和aspx.cs文件)。在我的新副本中我不得不删除一个文本框(textbox1)

所以我删除它但是我得到的错误''名称textbox1在当前上下文中不存在''。这里我们在javascript中也使用了这个文本框,但我删除了那个文本框,但是仍然得到了同样的错误。

请尽快帮助。

In my project i had to create one duplicate page for one page(aspx). So i copied the entire page (both aspx and aspx.cs files) .In my new duplicate i had to remove one textbox (textbox1)
so i removed it but nw am getting error that ''The name textbox1 does not exist in the current context''. Here we are using this textbox in javascript also but i removed that textbox everywhere but still getting same error.
please help as soon as possible.

推荐答案

您好,



您需要将textbox1检入.aspx.cs文件。将textbox1搜索到此文件中希望您获得一个。



或者双击错误,它会将您重定向到textbox1所在的那一行。
Hi,

You need to check textbox1 into .aspx.cs file. Search textbox1 into this file hope you will get one.

Or double click on the error and it will redirect you to that line where textbox1 is present.


更改您创建的类名(在.aspx和.cs页面中)。新页面是引用旧页面。



谢谢
Change the Class name(both in .aspx and .cs page) which you have created. The new page is refering old page.

Thanks


检查他们在哪里使用(''<%= textbox.ClientID%>'')如果是,则删除而不是评论。
Check that any where they are using (''<%= textbox.ClientID %>'') if yes remove that instead of commenting.


这篇关于获取错误当前上下文中不存在名称textbox1的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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