Alert icon
We're changing our privacy policy. This stuff matters.  Learn more  Dismiss

Two Visual Studio 2008 Tips ASP.NET Tutorial

Loading...

Sign in or sign up now!
12,364
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on Jul 22, 2009

Tip 1: Don't put business logic in the .aspx page. Tip 2: Use any language, such as C# or Visual Basic.

  • likes, 0 dislikes

Link to this comment:

Share to:

Uploader Comments (bidwx)

  • Why do you want to avoid business logic?

  • Hi - In order to improve the ability to maintain, change, and extend the code, business logic should not be combined with the user interface code. Check out our videos on UML for a discussion on how to break an application into classes.

see all

All Comments (7)

Sign In or Sign Up now to post a comment!
  • I am kinda new in the .net scene and ill be watching more but whatsup with the cursor it looks mad.

  • You say not to put business logic in your page itself, but then you contradict it by creating an instance of a class within your button's click event, instead of creating the instance as a property of the form or making this method static, which is also more business logic then the creation of a string, which in my opinion, is part of the designers work who you would now have to share your Greeter Class in order to be able to change that.

    These tricks should only be done in big programs.

  • I realize this is an old thread but I found this to be quite useful -- thanks, bidwx. To answer exlova's question, it's bad form to embed business logic such as "Hello world" in the codebehind. Typically, if a future developer wanted to change this greeting, the appropriate place to look would be in the construct behind the button's instance, which is what he is demonstrating here.

  • Where do I download this software please?

Loading...

0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more