drewsblues Posted October 30, 2003 Posted October 30, 2003 My company is getting ready to migrate to ASP.NET and we're looking to implement inter-team standards for coding and development for consistency's sake. Some of the questions I have pertain to using inline code vs. code-behind:Is it better to use code-behind than inline code with ASP.NET? Is it strictly a matter of preference? Are there some instances where using one is better than the other? We've traditionally worked in an ASP environment where everything is (without option) inline code. So the developers are most comfortable with that method of development. Unless there's a compelling reason to go with code-behind, we'll probably continue to code in an inline fashion. Still, I notice that Visual Studio.NET defaults to the code-behind method, so I'm wondering if it is intrinsically "better" than the old method of combining code and content. Advice and opinions are appreciated. Quote
Administrators PlausiblyDamp Posted October 31, 2003 Administrators Posted October 31, 2003 Code behind seperates the code from the interface - makes it easier for different teams to work on both parts, easier to work with source code control as well. Also the IDE supports code-behind much better (auto-complete, tooltips etc.) I personally can't think of many reasons to go with inline code rather than code behind. Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
Moderators Robby Posted October 31, 2003 Moderators Posted October 31, 2003 I see no valid reason for using in-line code at all. Also when you deploy an aspx file, you're code behind will stay in a compiled DLL. Quote Visit...Bassic Software
bungpeng Posted October 31, 2003 Posted October 31, 2003 What about the speed? which one is better? As what I understand, DLL will be faster, is it true? Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.