Ask a Question related to ASP.NET General, Design and Development.
-
Jay #1
Where to write the code
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
Jay Guest
-
Write PHP code above HTML tag
I've created a toolset that allows me to add Form fields that we use in our system. But now I want to take that a step further. I want to be able to... -
Write code
Where I write the code? In a class file or in the component? -
how and where write code
What is the best practices to write code in flash mx pro? That is where I write the code? In the scene, in a class ".as", or in the single... -
How to write to HeaderTemplate in the code
How do you write into the HeaderTemplate of a datagrid the code (i.e the code behind file, the .vb file.) I see you can change the HeaderStyle... -
Program to write code
Hi, could anyone recommend a good program to write code, currently using notepad. Thanks a lot in advance. Marcelo -
Steve C. Orr, MCSD #2
Re: Where to write the code
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
[url]http://Steve.Orr.net[/url]
"Jay" <jerry280@yahoo.com> wrote in message
news:%23Yr58dyRDHA.1896@TK2MSFTNGP12.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
>
>
Steve C. Orr, MCSD Guest
-
CT #3
Re: Where to write the code
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
[url]http://www.apress.com/book/bookDisplay.html?bID=105[/url]
"Jay" <jerry280@yahoo.com> wrote in message
news:%23Yr58dyRDHA.1896@TK2MSFTNGP12.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
>
>
CT Guest
-
George Ter-Saakov #4
Re: Where to write the code
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" <Steve@Orr.net> wrote in message
news:u9AP5gyRDHA.2008@TK2MSFTNGP11.phx.gbl...out> 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 itpage.> that way in a book rather than having 2 separate listings for a singlesold.> VS.NET pretty much forces you to use code behinds way anyway.
>
> --
> I hope this helps,
> Steve C. Orr, MCSD
> [url]http://Steve.Orr.net[/url]
>
>
> "Jay" <jerry280@yahoo.com> wrote in message
> news:%23Yr58dyRDHA.1896@TK2MSFTNGP12.phx.gbl...> > Hello everyone,
> >
> > I just got done taking a small course in ASP.NET and I'm completelywere> > This is amazing compared to original ASP.
> >
> > My question is about the preferred method of coding the asp pages. WeI've> > taught to write our code behind the page using VS.NET but some bookspreferred?> > 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>> >
> > Does anyone know of any pros and cons for each method?
> >
> > Thanks!
> >
> > - J
> >
> >
>
George Ter-Saakov Guest
-
Todd Thompson #5
Re: Where to write the code
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
Todd Thompson Guest
-
David Waz... #6
Re: Where to write the code
NO question - BEHIND
"Jay" <jerry280@yahoo.com> wrote in message
news:#Yr58dyRDHA.1896@TK2MSFTNGP12.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
>
>
David Waz... Guest



Reply With Quote

