Click here to Skip to main content
15,886,199 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I was create web application on ASP.NET USING C#. Code on design page is fine working But when i'm write code on .cs file then it is not working. please help me how to fix this.
Posted
Comments
Kornfeld Eliyahu Peter 14-Nov-13 1:55am    
Please share your code with us...
Sergey Alexandrovich Kryukov 14-Nov-13 2:20am    
"Not working..." is not informative. This is not even a question. We don't have access to your hard drive.
—SA

Hi,

The CodeFile is one of the reason for this issue.

Another one possiblity is the Class name. Asp.net has Partial class concept, so both .designer.cs file and .cs file must have same class name.


Regards,
Chetan Patel
 
Share this answer
 
check this line in design page At top and specially Inherits=" Your page Name "

<![CDATA[<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="Default" %>


and if You Are make page in particular folder like inside Demo Folder Default page then check this code in design page


<![CDATA[<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="Demo.Default" %>

AND in .cs page


namespace ProjectName.Demo
{
public partial class Default:system.web.ui
{
}


}
 
Share this answer
 
v2
]]>

check the above tag is in your code or not and CodeFile="Default.aspx.cs" is targetting on your .cs file(in which u want to write ur code),i don't know this is useful or not(just guessing) but once check out this tag in your design code page.
 
Share this answer
 

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900