Click here to Skip to main content
12,351,209 members (35,004 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: C# ASP.NET CSS .NET
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.
Posted 23-Jan-13 19:15pm
Comments
Orcun Iyigun 24-Jan-13 1:22am
   
Seems like you didn't remove textbox1 everwhere.. It is lurking somewhere and you have to find it.
Kavitha le 24-Jan-13 2:27am
   
I removed the textbox everywhere using find option.But still getting error
Is there any other reason or posibility for this error?
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

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.
  Permalink  
v2
Comments
Kavitha le 24-Jan-13 2:27am
   
I removed the textbox everywhere using find option.But still getting error
Is there any other reason or posibility for this error?
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 3

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

Thanks
  Permalink  
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 4

Check that any where they are using ('<%= textbox.ClientID %>') if yes remove that instead of commenting.
  Permalink  
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 2

Whatever you had textbox1 talking to in the first copy is probably still trying to talk to it in the new one.
  Permalink  
Comments
Kavitha le 24-Jan-13 2:27am
   
I removed the textbox everywhere using find option.But still getting error
Is there any other reason or posibility for this error?

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

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web01 | 2.8.160621.1 | Last Updated 24 Jan 2013
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100