Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > code behind or inline-coding

Reply
Thread Tools

code behind or inline-coding

 
 
Newbie \(C#,Asp.net\)
Guest
Posts: n/a
 
      11-10-2004
Hi
I have two simple questions that I make sure that I have underestood them

1) what is the main difference between inline coding and code behind besides
that code behind is part of DLL and is not visible like inline coding .

2) I am strill kind of confused why there is HTML server control when we
have equivalents in Web server controls ,why we should make an HTML control
to be run at server ?? what is the main difference betwwen these two guys?

thanks for your help


 
Reply With Quote
 
 
 
 
Karl Seguin
Guest
Posts: n/a
 
      11-10-2004
code behind provides intellisense (if you are using a tool) and better
compile-time error reporting. It gives you the illusion that your code and
presentation layer is separate which is good enough for most. If you are
using VS.Net, the benefits of codebehind are worth it (considering there
isn't a price to pay).

One of the reasons HTMLControls exist is to make porting html/asp code to
ASP.Net quick and easy. Simply add an id and a runat="server" and you
quickly have an object you can program against in code. Also, you need it
for things like file uploads and the such...

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/


" Newbie (C#,Asp.net)" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi
> I have two simple questions that I make sure that I have underestood them
>
> 1) what is the main difference between inline coding and code behind

besides
> that code behind is part of DLL and is not visible like inline coding .
>
> 2) I am strill kind of confused why there is HTML server control when we
> have equivalents in Web server controls ,why we should make an HTML

control
> to be run at server ?? what is the main difference betwwen these two guys?
>
> thanks for your help
>
>



 
Reply With Quote
 
 
 
 
Kevin Spencer
Guest
Posts: n/a
 
      11-10-2004
Hi Newbie,

> 1) what is the main difference between inline coding and code behind

besides
> that code behind is part of DLL and is not visible like inline coding .


ASP.net is object-oriented, which means that so-called inline coding isn't
going to behave in the same way that it would in classic ASP. Classic ASP is
procedural, and program flow generally runs from top to bottom, with the
exception of any side-trips through functions and subs. As ASP.Net is
object-oriented, program flow jumps around from one class to another, and is
not linear. Using procedural techniques in object-oriented code is going to
unhappily surprise you, in terms of results. The bottom line is, when using
object-oriented programming technolgies, you must use object-oriented
programming techniques, or you're asking for the hassle of your life.

> 2) I am strill kind of confused why there is HTML server control when we
> have equivalents in Web server controls ,why we should make an HTML

control
> to be run at server ?? what is the main difference betwwen these two guys?


Check out the following MSDN article:

http://msdn.microsoft.com/msdnmag/issues/01/09/asp/

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Neither a follower
nor a lender be.

" Newbie (C#,Asp.net)" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi
> I have two simple questions that I make sure that I have underestood them
>
> 1) what is the main difference between inline coding and code behind

besides
> that code behind is part of DLL and is not visible like inline coding .
>
> 2) I am strill kind of confused why there is HTML server control when we
> have equivalents in Web server controls ,why we should make an HTML

control
> to be run at server ?? what is the main difference betwwen these two guys?
>
> thanks for your help
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Non-code behind to code behind John ASP .Net 2 02-19-2007 07:08 PM
what is the difference between code inside a <script> tag and code in the code-behind file? keithb ASP .Net 1 03-29-2006 01:00 AM
Code-Behind Pain in the Behind! Daniel Manes ASP .Net 11 06-10-2005 09:47 PM
Fire Code behind code AND Javascript code associated to a Button Click Event =?Utf-8?B?Q2FybG8gTWFyY2hlc29uaQ==?= ASP .Net 4 02-11-2004 07:31 AM
Re: Code Behind vs. no code behind: error Ben Miller [msft] ASP .Net 1 06-28-2003 01:46 AM



Advertisments