Hi all.. New user here.. first post : ) So I was reading that one advantage of using ASP.NET is that it separates application logic from presentation HTML, is this always true? For instance, in Cold Fusion, lets say I want to omit a link on a page if a certain
url variable is defined, normally I would code this directly in with my HTML, so that being the case, would ASP.NET not let me do this since it supposedly makes you separate application logic from presentation HTML? Thanks
Error: Keyboard not found, press any key to continue.
Hello and Welcome! ASP.NET does allow you to place code inside of the html like ColdFusion. However, with the CodeBehind model that ASP.NET uses then you do not have to place the logic of displaying the link in the HTML rather you can place it in the code behing
the page that is separate from the HTML. This allows the designers to work in the HTML without having to look (or even know about) the logic behind the page. Good Luck.
Hi mssnare, thanks! I recently purchased ASP.NET Unleashed per recommendation from these forums, I've skimmed through the book and I think most my questions should be answered by the time Im done reading it (as im unfamiliar with the concept of code behind)
I assume you have some history with Cold Fusion, just curious, how long have you been developing with both languages? CF and ASP.NET? For some reason, I feel a bit uneasy with the whole concept of logic separate from presentation, to me it seems like you would
have more control over the aesthetics of a page when intermixing the two, what do you think? Thanks!
Error: Keyboard not found, press any key to continue.
Hello, No problem. I have been working with CF for a little over 6 years and with ASP.NET for about 3. I usually separate all code from the html but sometimes it makes a little more sense to me to put some code in the html. I usually try and look at it like
if the code in the html is very minor and the web designer editing the HTML can modify the code without effecting any business logic then it is safe to put it in the html. For instance if I'm displaying one image on mondays but another image on tuesdays then
the code that displays the image would probably be in the html. Because even if the designer modifies the code then the only thing effected is the UI. Good luck with the book! James
Hi James, Upon further reading, I think I can use inline code and inline expressions for what I want to accomplish. I think I was under the impression it was all or nothing but that doesnt seem to be the case :) By the way, do you know exactly how long ASP.NET
(not ASP) has officially been out? Thanks!
Error: Keyboard not found, press any key to continue.
HardKor
Member
85 Points
17 Posts
logic separate from presentation
Feb 11, 2005 08:00 PM|LINK
mssnare
Member
295 Points
59 Posts
Re: logic separate from presentation
Feb 12, 2005 05:25 AM|LINK
HardKor
Member
85 Points
17 Posts
Re: logic separate from presentation
Feb 12, 2005 06:56 PM|LINK
mssnare
Member
295 Points
59 Posts
Re: logic separate from presentation
Feb 13, 2005 03:43 AM|LINK
HardKor
Member
85 Points
17 Posts
Re: logic separate from presentation
Feb 13, 2005 06:50 AM|LINK
mssnare
Member
295 Points
59 Posts
Re: logic separate from presentation
Feb 13, 2005 09:07 PM|LINK