ASPX & ASCX - what's the difference?

bizzydint

Well-known member
Joined
Apr 8, 2003
Messages
75
My site (set up by someone else) is made up of a bunch of asPx pages, each containing controls specified in asCx files.

Now im guessing the "C" means theres code involved???? unless someone wants to enlighten me? :)


Its annoying me that the asPx files are essentially just templates which tell the page which Title control, footer control and main control to use. So i want to get rid of the asPx files, and make the ascx files contain a link to the Title and footer controls and the actual content of the main control (am i making sense??)


Im pretty sure its possible, so i really just want to know if its a particularly inefficient/frowned upon way of doing things....

cheers mdears,
van
 
ASCX files are designed to be placed within ASPX pages, they are missing several vital HTML tags (<HTML>, <FORM>, <BODY>, <HEAD>) and as such cannot be rendered by browsers.

Using them is a form of code / UI reuse and quite a good practice. Is there any particular reason why you desire to change how things are currently being done?
 
The reason is.....

We currently have a "skin" feature on our site - its meant for teenagers, who are notoriously picky!

The way it works atm is that for *each* skin we have a set of ASPX files and just one universal set of ASCX files containing the core controls which get reused for each skin.

Now you can imagine that this is a pain to update (although we rarely need to change the aspx files) and really these files dont have any vital info in them, so i wanted to do away with them.

But it seems that they are required. So Ill probably have to work out a way of having *one* set of ASPX which knows which skin style sheet, title bar and footer its meant to use....must be possible ;)


Thanks for helping - youve just confirmed what i already thought!
 
Back
Top