Please post the html source code of “Alterar.aspx”. Make sure the “GridView3” does not exist in a container control. Otherwise, you have to use “FindControl”. For example:
Sincerely,
Benson Yu
Microsoft Online Community Support
Please remember to mark the replies as answers if they help and unmark them if they provide no help. This can be beneficial to other community members reading the thread.
Tks for the reply, my problem is solved, i had a backup of that page on the project, but without the GridView3, so the error is about the other part of the partial class (backup page), after deleted that page, the project worked well!!
rui.j.olivei...
0 Points
2 Posts
Page fails compiling - 'does not exist in the current context'
Dec 19, 2007 01:43 PM|LINK
Hello everyone,
I´m doing a web site with a lot of gridviews, and one works fine on design mode but fails when i compile the solution.
The intellisense on the code behind file works fine.
The error message is :
Error 4 The name 'GridView3' does not exist in the current context C:\WWW\GIEPWeb\Alterar.aspx.cs 924 13 http://localhost/GIEPWeb/
Any sugestion???
Benson Yu - ...
All-Star
34797 Points
2497 Posts
Re: Page fails compiling - 'does not exist in the current context'
Dec 21, 2007 04:54 AM|LINK
Hi rui.j.oliveira,
Please post the html source code of “Alterar.aspx”. Make sure the “GridView3” does not exist in a container control. Otherwise, you have to use “FindControl”. For example:
CS0103: The name 'txtUsername' does not exist in the current context
http://channel9.msdn.com/ShowPost.aspx?PostID=348113
Benson Yu
Microsoft Online Community Support
Please remember to mark the replies as answers if they help and unmark them if they provide no help. This can be beneficial to other community members reading the thread.
rui.j.olivei...
0 Points
2 Posts
Re: Page fails compiling - 'does not exist in the current context'
Dec 21, 2007 10:05 AM|LINK
Hello Benson,
Tks for the reply, my problem is solved, i had a backup of that page on the project, but without the GridView3, so the error is about the other part of the partial class (backup page), after deleted that page, the project worked well!!
Rui Jorge Oliveira