Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Inline code Vs Code behind

Status
Not open for further replies.

Zarcom

Programmer
May 7, 2002
1,275
CA
I thought we should bring up the topic of inline code Vs. code behind techniques.

Personally I think that the code behind is a much better way of doing things. Helping people here in the forum I have came the realization that with inline code there is a lot of little quircks to be aware of that don't exist in true code behind.

A code behind solution makes it so easy to separate your design from your code. It definitely makes things more object oriented.

I thought I would bring up the topic to see what the rest of you think. That'l do donkey, that'l do
[bravo] Mark
 
Code behind all the way......

Let web designers loose on the ASPX and lets have real code on the ASPX.VB....

Craig
 
Do any of you use Dreamweaver MX for your designs. Since I work at a small company I am in charge of both the design and the programming. I choose Dreamweaver several years ago and have been with it ever since. I just recently bought Visual Studio.NET but haven't played with it much because I don't know what it will do to my code designed in Dreamweaver. Does anyone have an opinion on this??? I know that dreamweaver MX doesn't support building the code behind in the program. So that is why I haven't done code behind.
 
Okay, so I guess I'll transfer all my code from the script portion of the page to a codebehind page... what should I look for. Also, the code from my page already draws from a .vb file that is common to other pages... I just add that inheritance (is that what I would call it) to the new codebehind page?
 
Sounds more like a simple class file, not inheritence. Just make a reference to it and use it like any other object. That'l do donkey, that'l do
[bravo] Mark
 
Okay, so I got this:
<%@ Page Language=&quot;vb&quot; Debug=&quot;True&quot; Inherits=&quot;localhost.seniors&quot; Src=&quot;CodeBehind.vb&quot; CodeBehind=&quot;seniors.aspx.vb&quot; AutoEventWireup=&quot;false&quot; %>

The Inherits and CodeBehind fields were changed when I migrated to VS. What's the difference between CodeBehind, and Inherits/Src?
 
CodeBehind points to the code behind file that contains the class the page inherits.

So if you look at seniors.aspx.vb, you'll find a class called seniors, which has all the control declarations and event code for the page (and whatever custom code you've written).

Jack
 
switch to thread855-366797
That'l do donkey, that'l do
[bravo] Mark
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top