473,401 Members | 2,146 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,401 software developers and data experts.

code behind or inline-coding

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
Nov 18 '05 #1
2 2058
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)" <ne****@microsoft.com> wrote in message
news:Oz**************@TK2MSFTNGP09.phx.gbl...
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

Nov 18 '05 #2
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)" <ne****@microsoft.com> wrote in message
news:Oz**************@TK2MSFTNGP09.phx.gbl... 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

Nov 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Jon Maz | last post by:
Hi All, I've just noticed that there seem to be two ways of setting up a global.asax file. At http://www.csharphelp.com/archives/archive206.html the global.asax example has Application_Start...
2
by: Fred Armitage | last post by:
I have a fairly complex application written using a vb code-behind dll. However, I'd like to write one particular aspx page utilising in-line code so that it can easily be modified as needed by the...
3
by: Mitch A | last post by:
What are the advantages of using inline C# code in my aspx pages (with inline I mean directly in the html between <% %>) versus code behind. It seems messy and inelegant to have code in both...
171
by: tshad | last post by:
I am just trying to decide whether to split my code and uses code behind. I did it with one of my pages and found it was quite a bit of trouble. I know that most people (and books and articles)...
6
by: Paolo Pignatelli | last post by:
I have an aspx code behind page that goes something like this in the HTML view: <asp:HyperLink id=HyperLink1 runat="server" NavigateUrl='<%#"mailto:" &amp;...
6
by: Anders M | last post by:
I'm trying to use Inline-code to call Page_load, Page_Init or Page_PreRender methods. I've also got a code behind c#-file. I can define inline methods for buttons and so on...that works fine....
1
by: Kamal Ahmed | last post by:
Hi All, I have an aspx file written using vb.net that contains code both in code behind and inline. I want to access variable, object/classes declared in code behind into inline .aspx file....
8
by: neilmcguigan | last post by:
I just wanted to list some reasons why I prefer inline code to code-behind. 1. you can fix some bugs more quickly. remote desktop into server, change the aspx file, and she's good to go. I'd say...
5
by: pedestrian via DotNetMonster.com | last post by:
I'm just beginning to learn ASP.NET 2.0. I wonder what's the reason for using or not using the code behind file? Thanks for replying... -- Regards, Pedestrian, Penang. Message posted via...
0
by: =?Utf-8?B?U2hpdmEgUmFtYW5p?= | last post by:
Though there are several blogs/Q&A's on inline or codebehind debate, I would like to know the compilation model or the process thats happenign when we use Inline or code behind in ASPX. Would it be...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.