473,406 Members | 2,390 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

The name 'ControlName'does not exist in the current context

38
I included a control TextBox with 'txtError' name. whenever I build this I get this error.
The name 'txtError' does not exist in the current context
But its running on last successful Build.
I tried deleting deafult.aspx page from project, then building the project, then adding again the deafult.aspx in Project. But nothing worked.
Please find the solution for that.

Thanks & Regards
Nudrat
Jan 7 '08 #1
5 6908
Plater
7,872 Expert 4TB
That really does not tell us much, since we know nothing of your project.
First off, when you look at the default.aspx page that has the aspx code, you see your textbox with the correct ID of "txtError" ?
Second, the only place that is valid, will be the default.aspx scope.
default.aspx and either default.aspx.vb or default.aspx.cs, depending on your choice of language.

So if you could verify those two points perhaps outline a few more details about you problem, it would help us answer your question better.
Jan 7 '08 #2
Frinavale
9,735 Expert Mod 8TB
That really does not tell us much, since we know nothing of your project.
First off, when you look at the default.aspx page that has the aspx code, you see your textbox with the correct ID of "txtError" ?
Second, the only place that is valid, will be the default.aspx scope.
default.aspx and either default.aspx.vb or default.aspx.cs, depending on your choice of language.

So if you could verify those two points perhaps outline a few more details about you problem, it would help us answer your question better.
If this is an ASP.NET application, check the Default.aspx.designer.vb (or cs) to make sure that your text box has properly been registered.

Please note that this file doesn't exist if you are developing an ASP.NET website.
Jan 7 '08 #3
nudrat
38
Hi..
I have the correct ID for TextBox "txtError" and it is in the scope of default.aspx.cs page.


That really does not tell us much, since we know nothing of your project.
First off, when you look at the default.aspx page that has the aspx code, you see your textbox with the correct ID of "txtError" ?
Second, the only place that is valid, will be the default.aspx scope.
default.aspx and either default.aspx.vb or default.aspx.cs, depending on your choice of language.

So if you could verify those two points perhaps outline a few more details about you problem, it would help us answer your question better.
Jan 8 '08 #4
Plater
7,872 Expert 4TB
So somewhere, there is a piece of code that is trying to use that name but cannot.
Since error messages always allow you to go to the offending line, have you looked at where it tells you to go?
Jan 8 '08 #5
Frinavale
9,735 Expert Mod 8TB
Hi..
I have the correct ID for TextBox "txtError" and it is in the scope of default.aspx.cs page.
Could you please post both the ASP and C# code to do with the TextBox so that we can see what's going on?
Jan 8 '08 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: CuriousGeorge | last post by:
I've upgraded a .Net 1.1 web app to 2.0 and am having a heck of a time getting resources to work again. From what I understand if I move my strings.resx file into the App_GlobalResources folder I...
1
by: Arjen | last post by:
Hi, I do this inside a repeater: <% if ((Boolean)((DataRowView)Container.DataItem) == true) { %> <%} %> I get this message: CS0103: The name 'Container' does not exist in the current...
2
by: Jeff | last post by:
hey asp.net 2.0 (C'#) In the code behind file I have this method: public String AddBR(Object param) { String text = (String) param; return text; }
3
by: Michael | last post by:
Hi, I am getting a strange error. Last night when I left work this was working perfectly. This morning when I try to run this code in VS2005, it comes up with an error saying "The name 'UserName'...
2
by: weird0 | last post by:
When i am working on client side of a webservice, where i add a reference to it(have written the function CheckPincode inside the webservice), the compiler says: the name CheckPincode does not...
0
by: Terry | last post by:
Hello, I have problem adding controls to my webpage default.aspx. There is a group of controls that just refuse to be used with message: 'The name 'controlname' does not exist in the current...
6
by: cbellew | last post by:
G'day, I have encontered what appears to be a common problem, but unfortunately the typical solution i have found has not worked for me. I have just copied the files from an "ASP .NET Web Site"...
3
by: MiziaQ | last post by:
I'm trying to authenticate the user login in c#. I get the following 2 errors: 'the name 'login_username' does not exist in the current context' and 'the name 'login_password' does not exist in the...
0
by: brat33 | last post by:
I inheritede some code, and am making minor changes (email name changes) to the code, and want to recompile to another server. I am getting this error: "The name 'H39FE001E' does not exist in...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.