Click here to Skip to main content
15,888,579 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
One web page contains three type of files in asp.net.
1] Page.aspx
2] Page.aspx.cs
3] Page.aspx.designer.cs

.cs and .designer.cs both are partial classes. So I can access method and properties between two classes. they complied as one class but then where the Page.aspx comes into the picture. Page.aspx is like an HTML page.
Below line in .aspx page is very confusing. how can a html page inherit a class?

C#
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="WebApplication1.WebForm1" %>


Can I associate a class file with a normal html file?
Posted
Comments
Maciej Los 12-Oct-14 11:08am    
Not sure what you mean...

Sorry, but your question is not clear. Not to worry.

I think you found a code of ASP.NET Web Application (Visual C#)[^] and you're bit confusing with several file's types. Here is a bit of description: File Types and File Extensions in Visual Basic and Visual C#[^].

I' suggest you to start with basics: Developing Web Applications with ASP.NET[^]
 
Share this answer
 
v2
Comments
Sergey Alexandrovich Kryukov 12-Oct-14 12:24pm    
5ed.
I would rather say: the question is incorrect. The notion of "difference" is really something undefined. What is the difference between apple and Apple?
—SA
Maciej Los 12-Oct-14 12:28pm    
Thank you, Sergey.
You're right. "Incorrect" is much better in this context.
Difference[^]
Please check here, you will get to know. :)
.aspx is the viewpage
.aspx.cs is the class where the functionalities/events are defined
.aspx.designer.cs allows Visual Studio to give the user IntelliSense in the code-behind page for server controls created at design-time.

Like suppose we have a button on the view page i.e. .aspx and the click event is defined in the .aspx.cs.
Thanks
Hope this helps.
:)
 
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