• 1
  • 2
Home > Tips

What is the Differences between .aspx and .ascx?

 

What's the Differences between .aspx and .ascx?

 

 S.No

 ASPX

ASCX 

 1

ASP.NET Page uses the extension .aspx
For eg: Default.aspx

User Control uses the extension .ascx
For eg: WebUserControl.ascx.

 2

ASP.NET Page begins with a Page Directive.
For eg:
<%@ Page Language='C#'
AutoEventWireup='true'
CodeFile='Default.aspx.cs'
Inherits='_Default' %>

User Control begins with a Control Directive.
For eg:
<%@ Control Language='C#'
AutoEventWireup='true'
CodeFile='WebUserControl.ascx.cs'
Inherits='WebUserControl' %>

 3

 Usercontrol code can be used in webforms

We can not use webforms in usercontrol. 

 4

 ASP.NET Page can be viewed directly in the Browser.

User Control cannot be viewed directly in the browser. User Controls are added to WebPages and we view them by requesting a web page in our browser. 

 5

 ASP.NET page has HTML, Body or Form element.

 ASP.NET page has HTML, Body or Form element.

 

Choose a SliceMaker Product to Create a Website on Your Own-30 Day Freetrial
SliceMaker Standard V3.6 - Freeware
SliceMaker Standard V3.6 - Freeware
The anyone-can-master webpage making software. You can create exceptional webpage/website on your own even if you're unfamiliar with webpage making.
$0
$0
SliceMaker Platinum V3.6 - Freeware
SliceMaker Platinum V3.6 - Freeware
The bestselling webpage making software, helps you create exceptional webpage/website without writing complicated CSS and DIV codes.
$0
$0
SliceMaker Deluxe V3.6 - Freeware
SliceMaker Deluxe V3.6 - Freeware
The all-in-one webpage making software, helps you create webpage/website of any style. It's the idea tool to create webpage/website.
$0
$0