Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Having URL without .aspx extension

Tags:

url

asp.net

I noticed a lot of ASP .Net sites does not have the URL ending with ".aspx".

An example would be: - https://stackoverflow.com/questions

Did they create a Questions folder and put a Default.aspx inside?

In that case, wouldn't there be A LOT of default.aspx in many folders which is hard to maintain (even though it is user-friendly)?

Thanks y'all.

like image 516
Weng Fai Wong Avatar asked Nov 07 '10 08:11

Weng Fai Wong


People also ask

What does ASPX mean in a URL?

Active Server Pages (ASPX) is a file format used by web servers and generated using the Microsoft ASP.NET framework - an open-source development framework used by web developers to create dynamic web pages, often with the . NET and C# programming languages.

Can you edit .aspx files?

Sometimes, the aspx files can be opened and edited with text editor. If you have free software such as Notepad++, you can open and edit the aspx files in it. Microsoft's Visual Studio is another free program that allows you to open and edit an aspx file. Adobe Dreamweaver can also open and edit an apsx file.


2 Answers

StackOverflow is written using ASP.NET MVC. The MVC framework does not use .aspx files.

The way it works internally is by using routing tables - see an overview here.

You can also do this with ASP.NET and .aspx files or you can use URL rewriting. You can read about the differences here.

like image 83
Oded Avatar answered Oct 17 '22 19:10

Oded


You can refer to any URL rewriter or a routing technique for that. If you look at the new AS{.NET MVC, it works on that model only.

like image 40
Kangkan Avatar answered Oct 17 '22 19:10

Kangkan