ASP.NET from Scratch : Lesson 2
videos

ASP.NET from Scratch: Lesson 2

Tutorial Details
  • Length : 42 minutes
  • Difficulty: Intermediate
This entry is part 2 of 10 in the ASP.NET from Scratch Session
« PreviousNext »

Continuing on from lesson one, Jeremy McPeak, author of Professional AJAX, and Beginning JavaScript: 4th Edition, will take things a step further as we delve deeper into working with the ASP.NET framework.


Screencast


Other Viewing Options


Jeremy McPeak is jwmcpeak on Codecanyon
Tags: Videos
Note: Want to add some source code? Type <pre><code> before it and </code></pre> after it. Find out more
  • http://www.fuseboxgroup.com Bleyder

    No FLV Version?

    • http://net.tutsplus.com Jeffrey Way

      The version above is FLV.

      • http://www.fuseboxgroup.com Bleyder

        Hi Jeffrey. I meant a direct link to a FLV version of the video like in the previous lesson.

  • http://www.twitter.com/Shote Shote

    Thank you.. keep them coming. Good work!

  • TJM

    Don’t use asp:Panel as they usually render as divs – use asp:Placeholder for a cleaner option.

    • http://www.wdonline.com Jeremy McPeak
      Author

      The Panel and PlaceHolder controls serve two different purposes – much like the Label and Literal controls.

      My use of Panel controls in EmailForm are correct – they contain markup and other controls. If I wanted to dynamically add the markup and controls to the page, the PlaceHolder would be the correct control to use.

      Correct use aside, I wanted a element. Why use a PlaceHolder if you’re going to contain everything in a element anyway?

      • http://www.wdonline.com Jeremy McPeak
        Author

        Oops, that last paragraph should read:

        Correct use aside, I wanted a div element. Why use a PlaceHolder if you’re going to contain everything in a div element anyway?

      • TJM

        If that’s what you wanted to achieve then that’s great as you are in control of everything, but I’m not too keen on relying on a dynamically generated Id, especially one with and Id of “pnlSuccess”.

        For me a cleaner option is to use my own markup wherever possible with .NET – maybe just a habit I picked up since working with it since version 1.1 (when by default .NET rendered asp:Panels as table elements in non-IE “downgraded” browsers) and working in teams with roles that divide the presentation with the business logic.

        Lovely and methodical tutorial BTW!

  • http://sasa.po.gs sasa

    Nice,
    thanks for lesson #2!

  • TJM

    Don’t use asp:Panel as they usually render as divs – use asp:Placeholder for a cleaner option.

    • http://www.wdonline.com Jeremy McPeak
      Author

      See above.

  • Staggo

    Thanks for that!!!

  • pelumi

    ‘am glad this is finally out

  • Bruno

    Great.
    Finally some Asp.net articles;)

    Waiting for more.

  • Nick

    So glad that the second lesson is finally here… Those are really helpful!!!
    When is the next one coming out?

  • Maran

    I am .net developer. Its good have atleast few ASP.Net artticles. Thanks guys

  • http://stref.ru YrZ

    ASP sucks, learn php :)

    • http://www.wdonline.com Jeremy McPeak
      Author

      I agree. ASP sucks. ASP.NET is much, much better, and in my opinion, it’s better than PHP (I used to be a PHP guy).

      • Zoran

        Could you please answer my question from bellow about the difference and how hard (long) is to learn ASP.NET if you are very good in PHP? I am using PHP for about year and a half and came to a conclusion that i can be very limited when it comes to making some complex stuff. I agree with you, some people are just too proudly ignorant that they don’t even know that ASP is different thing from ASP.NET :). It’s a fact that if you know more it’s better for you, so don’t be discouraged by bad comments, just keep up the good work, some people want to learn instead to fight what is better.
        @YrZ, try ASP.NET, use it for a while, then judge it… didn’t they teach you that prejudice is a bad thing? I love PHP a lot and did almost anything with it, but i am not married to it :D

      • http://www.wdonline.com Jeremy McPeak
        Author

        I was typing out a short reply as you replied here =)

  • Sergio

    around min 7 i think he said control like 10 times. still very helpful to understand controls.

  • Zoran

    Could anybody, please tell me how hard is to learn ASP.NET if you are very good at PHP and what are the advantages of using ASP.NET over PHP? I am PHP lover, but i think that being familiar with more programming languages always is a good thing. Thank you for your video Jeremy, i am going to give it a try to learn at least the basics.

    • http://www.wdonline.com Jeremy McPeak
      Author

      The two most challenging aspects of learning anything .NET, in my opinion, are:

      1. Getting familiar with with the classes in the Framework Class Library.
      2. Learning and getting comfortable with object oriented programming (if you don’t have any OOP experience).

      I can only speak from my experience, but the only problem I had in switching to ASP.NET with C# from PHP was finding decent online resources (I switched in 2003). That’s not much of a problem these days.

      The first part of this series covered some of the advantages. It’s by no means an exhaustive list. Something I didn’t put into that list is flexibility. One thing I hate about PHP is being completely dependent on the PHP installation in a shared-hosting environment. Unless you have a very generous host, you’re out of luck if you want to use extensions or third party components that require you to recompile PHP.

      With ASP.NET, using extensions or third party components is typically completely in your control. You simply add a reference to the components/extensions in your project, upload the DLLs, and you’re ready to roll. There are some exceptions to this; nothing requires a recompilation of .NET on the server, but some components do have to be installed on the web server in order to work correctly. MySQL’s Net Connector is one such component that has to be installed in order to take advantage of all the features.

      • Zoran

        Thank you for your answer, i am bit familiar with Visual Basic, Java and very much with OOP PHP, which i prefer over procedural way of coding. I think i will give it a shot to ASP.NET, not soon, but i downloaded both of your videos and will have a look when i have more free time. I won’t either have problem with databases, cause i have degree in Databases structures and never had problems switching from MySQL to something else, cause SQL as we know is same for each model. Also thanks for mentioning C#, that’s on my list too and keep up the good work… Variety and having multiple choices is always a good thing.

  • Torsten

    I need new CI from Scratch Lessons and i have an Idee for the next from Scratch Lessons Java!!!

  • Matt

    I was waiting for this for weeks. I haven’t watched it yet, but THANK YOU for putting this up.

  • http://www.chrispaul.ws Chris

    So the code in btnSubmit_Click runs before Page_Load, correct? Or what’s the order there?

    Wow, I didn’t realize Server 2008 was free for students. What’s the difference between 2008 and 2008R2?

    • Matt

      2008R2, for the biggest improvement/hurdle, is that it is 64-bit only. It can run 32-bit apps through the WoW subsystem, but it is only 64-bit on the hardware level. It includes an updated IIS, ActiveDirectory enhancements, better virtualization support, etc.

      If you can run R2, do it instead of regular 2008. I think the only reason they have 2008 still up is for creating legacy applications designed for the 2008 platform (note, the student editions were created for studying, not for actual use).

    • http://www.wdonline.com Jeremy McPeak
      Author

      Anything that causes a postback executes after the Page’s Load event. We haven’t gotten into postbacks for simplicity’s sake, but clicking the button causes a postback. So btnSubmit_Click executes after Page_Load.

      • http://chrispaul.ws Chris Paul

        Awesome, thanks for your explanation. It really clears things up. Looking forward to Video 3.

  • Ross

    Thanks a lot for the extremely helpful tutorial. I did C# ages ago, but have found that I forgot most of what I learned, and Im really eager to learn the ins and outs of the language again so that I can get serious with XNA, and also have a look at considering ASP.NET as my Web dev language of choice at work.

    Keep up the great work!

  • Serge

    Thank you. Waiting for lesson 3 ;)

  • http://freddygonzalez.me Freddy Gonzalez

    I really like this. So how would you deploy it on your server. What files and or folders do you include.

    • Skunkie

      Simply Click “Build > Publish” and activate the “only files to run this apllication” button (select a local file path and see what happens).

      In detail

      You include:

      - the compiled .NET assemblies (the bin folder)
      - the web.config
      - static files (like .css, images etc.)
      - uncompiled aspx pages

      You do not include:

      - C# code files (including code-behind classes of aspx files)
      - Project and Solution files
      - the obj folder

      A free tool like CruiseControl.NET gives you more advanced publishing and maintanance option. You should check that for real-world apps.

  • Vijay

    Excellent!!! Eagerly awaiting lesson 3.
    How different is C# with .net to VB with .net ? I have to work only in VB.net, but I am relate it to what I am working on.
    Thanks and keep up the generous good work !!!

    • Vijay

      Sry, I mean I could relate your lesson with my work.

    • Neil

      @Vijay, I have been using .Net for the last 4 years, I just switched from VB.Net to C# 3 weeks ago and actually prefer C# over VB.

      @Jeremy McPeak, great screen cast, very thourough.

  • Miguel

    Awesome stuff, been waiting for this! Keep up the good work.

  • Pete

    Really awsome series.

  • Riya

    waiting for ASP.NET from Scratch: Lesson 3

    • http://sasa.po.gs sasa

      me too

  • abdu

    Thank you , waiting for next .

  • http://laranzjoe.blogspot.com lawrence77

    both the two lessons are fantastic….

    Now only finish watching… they are stunning for the beginners….

    Jeremy u rocks….. waiting for the further lessons…

  • http://conradsharry.blogspot.com spartax

    thanks for the lesson… really helpful.

  • tobar

    please ci or php videos. i hate .net and ms. asp is a stupid language.if i were you i learn java not asp ;)

    if you learn asp.net you will pay lots of dolars for hosting and sqlserver but linux is free and more secure.

  • http://georgehennessy.com George Hennessy

    @Jeremy M.

    Great job on this tutorial. How were you able to center the email form. I’ve thoroughly examined your CSS codes and did not see any code for “centering”. I’ve tried the text-align: center, but this didn’t work for me. I’m running Windows XP Pro, Internet Explorer 8 and Firefox 3. In both IE and Firefox, the email form appears to the left of the browser.

    Thanks.

    • http://sasa.po.gs sasa

      this is thing what center form:

      margin: 0px auto;

  • http://www.master-dissertations.com CharlotteqK

    With the purpose to prevent the failures in some dissertation tips, that should be better to purchase the cool research referring to this topic at the dissertation writing service in Internet. It’s not so hard to reach the PhD coming that way.

  • http://sasa.po.gs sasa

    waiting for ASP.NET from Scratch: Lesson 3

  • Peter

    Awesome lesson. I have a little bit of experience in Java and it’s nice that it has some similarities.

  • Mark Erasmus

    These tutorials are absolutely superb. Thanks Jeremy.

  • Joshua

    So where is Lesson 3?

  • http://www.oma.com.tw/ 熱水器

    I see the 2concern,I am very m happy to hear that you got your Supra fixed: I remember reading about some of your problem4x !.

  • Jonathan

    This screencast is just crazy, I cite from min 6:30:

    “The intellicence tells us the Controls property is of type control collection. The collections in the framwork class library are pretty descriptive as what type of objects the collection holds. Science the word collection is prepended by the word control we can determine that the control collection class is a collection of control objects. Now remember in part one when i said that controls were classes, well all controls are subclasses of the Control class. Therefor all controls are instances of the Control class so the controls properties contains all the control objects that are contained within this form object…..”

    WOW, how can someone understand just by listening…

  • saman

    how to download these lessons ? kindly guide .thanks