Results 1 to 7 of 7

Thread: [2005] Which is Best

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Dec 2006
    Location
    UK
    Posts
    489

    [2005] Which is Best

    Hi

    I am new to asp.net and have noticed that vb coding can be stored within aspx.vb, or just the aspx page I am currently working on.

    Personally I like to keep the coding within the page at the moment, but would like some opinions.

    Cheers
    Learning C♯

    Data Binding & Bound Controls - Objects and wizards will never be as intelligent as you, do it yourself! (Unless your Pro)

  2. #2
    Frenzied Member brin351's Avatar
    Join Date
    Mar 2007
    Location
    Land Down Under
    Posts
    1,293

    Re: [2005] Which is Best

    It's better to seperate design (html) from code (vb, c#). This is one advance asp.net introduced not just by having a seperate code page but also server controls instead of code in the html itself.

  3. #3
    Hyperactive Member kayos's Avatar
    Join Date
    Apr 2004
    Location
    Largo, Florida
    Posts
    306

    Re: [2005] Which is Best

    really, it is all a matter of personal preference. i keep my code separate because i think it is cleaner.


    If this post helps, please RATE MY POST!

    Using Visual Studio 2005 SE

  4. #4
    Hyperactive Member gjon's Avatar
    Join Date
    Nov 2004
    Location
    Inescapable Void
    Posts
    442

    Re: [2005] Which is Best

    Code behind files are a good mindset. Separation of code is a good mindset. This mindset keeps you on a path of keeping things separate like creating objects. You'll probably find this mindset will help you with object oriented programming. So yes it will keep things clearer to you in your code, but it will also keep your mind oriented towards better organization of all coding aspects.
    Good Luck with your programming.

  5. #5
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: [2005] Which is Best

    Placing the code in the same .aspx page is for amateurs. Shown in tutorials to save writing and typing efforts. And books to save space.

    Also, if anyone places their code in the .aspx file then they will not enter Jesus' glorious kingdom of heaven.

  6. #6
    Hyperactive Member gjon's Avatar
    Join Date
    Nov 2004
    Location
    Inescapable Void
    Posts
    442

    Re: [2005] Which is Best

    Amen to that!

  7. #7

    Thread Starter
    Hyperactive Member
    Join Date
    Dec 2006
    Location
    UK
    Posts
    489

    Re: [2005] Which is Best

    Quote Originally Posted by mendhak
    Placing the code in the same .aspx page is for amateurs. Shown in tutorials to save writing and typing efforts. And books to save space.

    Also, if anyone places their code in the .aspx file then they will not enter Jesus' glorious kingdom of heaven.
    Yes, it was shown in a tutorial, hence why I was unsure, anyways I put all my coding externally now
    Learning C♯

    Data Binding & Bound Controls - Objects and wizards will never be as intelligent as you, do it yourself! (Unless your Pro)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width