The .aspx is the actual page, what the user views in their browser, the .ascx is a custom user
control that is used in the .aspx page. You cannot display a .ascx file in a web browser, just
the .aspx page.
.Aspx:
1 .aspx extension is used for web forms.
2 ASP.NET Page uses the extension .aspx For eg: Default.aspx
3 ASP.NET Page begin with a Page Directive. For eg:
<%@ Page Language="C#"
AutoEventWireup="true"
CodeFile="Default.aspx.cs"
Inherits="_Default" %>
4 Usercontrol is code which can be used in webforms.
5 ASP.NET Page can be viewed directly in the Browser.
6 ASP.NET Page has a HTML, Body and Form Element
.Ascx:
1 .ascx extension is used for user control .
2 User Control uses the extension .ascx For eg: WebUserControl.ascx.
3 User Control begin with a Control Directive. For eg:
<%@ Control Language="C#"
AutoEventWireup="true"
CodeFile="WebUserControl.ascx.cs"
Inherits="WebUserControl" %>
4 You can not use webforms in usercontrol.
5 The main advantage of user control is reusability ,u can this control in any number of webforms.
6 User Control cannot be viewed directly in the browser. User Controls are added to WebPages and you view them by requesting a web page in your browser.
7 User Control does not have a HTML, Body or Form element. It is hosted inside an ASP.NET Page.
control that is used in the .aspx page. You cannot display a .ascx file in a web browser, just
the .aspx page.
.Aspx:
1 .aspx extension is used for web forms.
2 ASP.NET Page uses the extension .aspx For eg: Default.aspx
3 ASP.NET Page begin with a Page Directive. For eg:
<%@ Page Language="C#"
AutoEventWireup="true"
CodeFile="Default.aspx.cs"
Inherits="_Default" %>
4 Usercontrol is code which can be used in webforms.
5 ASP.NET Page can be viewed directly in the Browser.
6 ASP.NET Page has a HTML, Body and Form Element
.Ascx:
1 .ascx extension is used for user control .
2 User Control uses the extension .ascx For eg: WebUserControl.ascx.
3 User Control begin with a Control Directive. For eg:
<%@ Control Language="C#"
AutoEventWireup="true"
CodeFile="WebUserControl.ascx.cs"
Inherits="WebUserControl" %>
4 You can not use webforms in usercontrol.
5 The main advantage of user control is reusability ,u can this control in any number of webforms.
6 User Control cannot be viewed directly in the browser. User Controls are added to WebPages and you view them by requesting a web page in your browser.
7 User Control does not have a HTML, Body or Form element. It is hosted inside an ASP.NET Page.
Very helpful, thanks!
ReplyDeleteHelpful info thanks!!
ReplyDeleteI love the blog. Great post. It is very true, people must learn how to learn before they can learn. lol i know it sounds funny but its very true. . .
ReplyDeletepython Training in Pune
python Training in Chennai
python Training in Bangalore
Really nice experience you have. Thank you for sharing. It will surely be an experience to someone.
ReplyDeleteData Science Training in Indira nagar
Data Science Training in btm layout
Data Science Training in Kalyan nagar
Data Science training in Indira nagar
Data science training in bangalore
Useful post, thank you!
ReplyDeleteNice Blog. the blog is easily clarify the queries for the beginners. every concept should be very neatly represented.
ReplyDeleteData Science Training Course In Chennai | Data Science Training Course In Anna Nagar | Data Science Training Course In OMR | Data Science Training Course In Porur | Data Science Training Course In Tambaram | Data Science Training Course In Velachery
Nice
ReplyDeleteThis post is so interactive and informative.keep update more information...
ReplyDeleteDevOps course in Tambaram
DevOps Training in Chennai
I really appreciate your clear and concise explanation of the differences between .aspx and .ascx pages. Your blog provides valuable insights for developers, making it easier to understand their distinct roles. Great job!
ReplyDeleteyou can also visit:
Python and Big Data: Analyzing Massive Datasets