C# .NET - Error - The name does not exist in the current context asp.net error

Asked By mandar kunte on 22-Jan-09 12:57 AM

am creating ASP.net C# web application.

am using Checkbox. i can use it in my .cs file but when i run d program i get d error

The name does not exist in the current context asp.net error

even i have mentioned runat = "server"

if i can use it in my .cs file (on ctrl + <space> it is showing the name of the checkbox)

then, why it is giving such error?


re

Web Star replied to mandar kunte on 22-Jan-09 01:09 AM

Did you add a reference to System.Web.dll to your project? That is more important than a "using" clause, as that is no more than a "type saving" device (meaning: less to type in).


 

see this

Kalit Sikka replied to mandar kunte on 22-Jan-09 01:09 AM
This could occur in any case i.e.
1. You are using same .cs file for multiple aspx pages
2. <%@ Page Language="C#" AutoEventWireup="true" CodeFile="InvalidFile.cs" Inherits="GridView_Pack" %>
CodeFile tag of aspx page have inconsistant .cs file name

re

Web Star replied to mandar kunte on 22-Jan-09 01:11 AM

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=200532&SiteID=1

http://forums.asp.net/p/1006588/2783554.aspx

http://forums.asp.net/t/1006588.aspx

TRY THIS LINK
C_A P replied to mandar kunte on 22-Jan-09 06:20 AM

http://forums.asp.net/p/1006588/2783554.aspx

http://www.velocityreviews.com/forums/t360511-cs0103-strange-errors.html

http://www.daveparslow.com/2007/10/error-name-does-not-exist-in-current.html

 

error:the name does not exist in the current context
anaram moazami replied to mandar kunte on 05-Jul-09 03:08 AM
I checked every things but i have this error!what have i do?
thanks
Dutt Dutt replied to Kalit Sikka on 20-Jan-10 05:11 AM
thansk your reply rellly saved my time. thanks Dutt