Hello everyone,
I just got done taking a small course in ASP.NET and I'm completely sold.
This is amazing compared to original ASP.
My question is about the preferred method of coding the asp pages. We were
taught to write our code behind the page using VS.NET but some books I've
seen have examples where you write the code right on the aspx page.
Is one of these methods more proper than the other, maybe more preferred?
Does anyone know of any pros and cons for each method?
Thanks!
- J 5 1615
One of the worst things about old ASP was that you had to mix presentation
with logic. Messy Messy.
Code behinds files are the solution. Enjoy it.
Books tend to print examples the other way because it's easier to lay it out
that way in a book rather than having 2 separate listings for a single page.
VS.NET pretty much forces you to use code behinds way anyway.
--
I hope this helps,
Steve C. Orr, MCSD http://Steve.Orr.net
"Jay" <je******@yahoo .com> wrote in message
news:%2******** ********@TK2MSF TNGP12.phx.gbl. .. Hello everyone,
I just got done taking a small course in ASP.NET and I'm completely sold. This is amazing compared to original ASP.
My question is about the preferred method of coding the asp pages. We were taught to write our code behind the page using VS.NET but some books I've seen have examples where you write the code right on the aspx page.
Is one of these methods more proper than the other, maybe more preferred?
Does anyone know of any pros and cons for each method?
Thanks!
- J
I'm with Steve on this one; use code behind as it is so much easier to
maintain.
--
Carsten Thomsen
Enterprise Development with Visual Studio .NET, UML, and MSF http://www.apress.com/book/bookDisplay.html?bID=105
"Jay" <je******@yahoo .com> wrote in message
news:%2******** ********@TK2MSF TNGP12.phx.gbl. .. Hello everyone,
I just got done taking a small course in ASP.NET and I'm completely sold. This is amazing compared to original ASP.
My question is about the preferred method of coding the asp pages. We were taught to write our code behind the page using VS.NET but some books I've seen have examples where you write the code right on the aspx page.
Is one of these methods more proper than the other, maybe more preferred?
Does anyone know of any pros and cons for each method?
Thanks!
- J
I would say everything what goes to presentation layer goes into aspx.
Business logic goes to DLL.
Now the question is where Page::OnLoad belogs?
I say it's a presentation layer and the best place for it in the aspx.
George, MSCD ( I like my fancy title).
"Steve C. Orr, MCSD" <St***@Orr.ne t> wrote in message
news:u9******** ******@TK2MSFTN GP11.phx.gbl... One of the worst things about old ASP was that you had to mix presentation with logic. Messy Messy. Code behinds files are the solution. Enjoy it. Books tend to print examples the other way because it's easier to lay it
out that way in a book rather than having 2 separate listings for a single
page. VS.NET pretty much forces you to use code behinds way anyway.
-- I hope this helps, Steve C. Orr, MCSD http://Steve.Orr.net
"Jay" <je******@yahoo .com> wrote in message news:%2******** ********@TK2MSF TNGP12.phx.gbl. .. Hello everyone,
I just got done taking a small course in ASP.NET and I'm completely
sold. This is amazing compared to original ASP.
My question is about the preferred method of coding the asp pages. We
were taught to write our code behind the page using VS.NET but some books
I've seen have examples where you write the code right on the aspx page.
Is one of these methods more proper than the other, maybe more
preferred? Does anyone know of any pros and cons for each method?
Thanks!
- J
I would say everything code-wise is best in code-behind. You can still
seperate your presentation and business logic very cleanly using
code-behind, and the presentation code is much cleaner then it would in
page.
With code-behind it is also much simpler to write code (even presentation
code) that is shared across many pages.
Todd Thompson
NO question - BEHIND
"Jay" <je******@yahoo .com> wrote in message
news:#Y******** ******@TK2MSFTN GP12.phx.gbl... Hello everyone,
I just got done taking a small course in ASP.NET and I'm completely sold. This is amazing compared to original ASP.
My question is about the preferred method of coding the asp pages. We were taught to write our code behind the page using VS.NET but some books I've seen have examples where you write the code right on the aspx page.
Is one of these methods more proper than the other, maybe more preferred?
Does anyone know of any pros and cons for each method?
Thanks!
- J
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Viviana Vc |
last post by:
How can I programatically do the equivalent of the following:
cacls "C:\Program Files\test" /T /G Everyone:f ?
Thanks,
Viv
|
by: Rajesh |
last post by:
Hi,
I am using iplanet webserver 4.1. I want to call a java class from
ssjs file. But I am not getting the result. I have created a java class
file and put it in the folder <Server>\Netscape\Server4\bin\https\jar
folder. But I am not sure whether it is the right location to put the
class file. Also I would like to know how to put the class file in jar
format. The Java file and the ssjs file code given below.
Java part
package pdfbase;
|
by: Britney |
last post by:
Original code:
this.oleDbSelectCommand1.CommandText = "SELECT TOP 100 user_id, password, nick_name, sex, age, has_picture, city, state, " +
"country FROM dbo.users WHERE (has_picture = ?) AND (sex = ?) ORDER BY age "
this.oleDbSelectCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("has_picture", System.Data.OleDb.OleDbType.Boolean, 1, "has_picture"));
this.oleDbSelectCommand1.Parameters.Add(new...
|
by: rdemyan via AccessMonster.com |
last post by:
I'm trying to implement a licensing scheme. There are three types of
licenses:
Trial - good for 30 to 60 days
Interim - good for 1 year
Fully Paid - no expiration
Everything is working fine and I've even implemented a registration system
where the users can upgrade by just receiving a code from me.
|
by: Yelena Varshal via AccessMonster.com |
last post by:
Hello,
I have a problem with one of msaccess.exe API calls that work on my desctop
but does not work on the laptop from within MS ACCESS. There is a lot of
differences between 2 computers including one running Office 2000 and another
running Office 2003. This code was created by a previous developer. I need to
find the description and parameters of the API calls. I found the article
...
| |
by: Mr Flibble |
last post by:
I can embed code within <% %> within my page or put it in the .aspx.cs
file (perhaps within the load method). What are the advantages over each?
Background:
I have some XML and I want to display it in some tables.
In my opinion I can either loop through some XML data and use
Repsonse.write or some other mechanism to populate a table, OR, I can
loop through it via the load method of the associated .aspx.cs file and
use the...
|
by: chrisdavis |
last post by:
I'm trying to filter by query or put those values in a distinct query
in a where clause in some sort of list that it goes through but NOT at
the same time. Example:
ROW1
ROW2
ROW3
ROW4 , etc.
I want to go to the first row, do a WHERE statement, return the
|
by: neelesh kumar |
last post by:
sir,
now when i open the database tools menu is not coming.i want that only.
but if i open my database by pressing shift button tools menu is coming.i have a code to disable the shift key
where i have to write the code.
where is the database property allowbypassshiftkey.i didnt find that
where i have to write the shiftkey disable code
|
by: Miroslaw Makowiecki |
last post by:
Where can I download Comeau compiler as a trial version?
Thanks in advice.
|
by: Phlip |
last post by:
1230987za wrote:
Kanze is a classically-trained "unit tester". In some circles "unit" is a QA
concept - specifically, if a test fails, you only need to inspect one unit.
So "units" are "things which are clearly delimited and accessible to
inspection". That should map onto C++ classes - specifically due to
overlapping requirements. C++ classes _should_ be "things which are clearly
delimited and accessible to inspection". Yet...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |