﻿<?xml version="1.0" encoding="utf-8" ?> 
<?xml-stylesheet type="text/xsl" href="../../webpages/courses.xsl" ?>
<!--
/////////////////////////////////////////////////////////////////////////////////////////
//  CSE686codeL3.xml - provides links Lecture #3 materials                   //
//                     on the ECS college server                                          //
//                                                                                                   //
//  Jim Fawcett, CST 2-187, Syracuse University, jfawcett@twcny.rr.com //
/////////////////////////////////////////////////////////////////////////////////////////
-->

<courses name="Fawcett">

  <btitle>CSE686 Lecture #3</btitle>
  <theme src="../../webpages/CodeTheme.css" />

  <visible>
  <title>CSE686 - Internet Programming</title>
  <subtitle>Lecture #3 - Asp.Net Programming Model</subtitle>
  <revised>08 June 2010</revised>
  
  <hilight>
    <ifile title="Home">../../webpages/FawcettHome.xml</ifile>&#32;
    <ifile title="Courses">../../webpages/Courses.xml</ifile>&#32;
    <ifile title="Code">../../webpages/Code.xml</ifile>&#32;
    <ilink title="Handouts">www.ecs.syr.edu/faculty/fawcett/handouts</ilink>&#32;
    <ifile title="CoreTech">../../webpages/CoreTechnologies.xml</ifile>&#32;
    <ifile title="Books">../../webpages/Books.xml</ifile>&#32;
    <ifile title="Articles">../../webpages/Articles.xml</ifile>&#32;
    <ifile title="Math">../../webpages/Mathematics.xml</ifile>&#32;
    <ifile title="Research">../../webpages/research.xml</ifile>&#32;
    <ifile title="Masters Projects">../../webpages/MastersProjects.xml</ifile>&#32;
    <ifile title="SWDev">../../webpages/swdev.xml</ifile>&#32;
    <ifile title="WebDev">../../webpages/webdev.xml</ifile>&#32;
    <ifile title="News">../../webpages/news.xml</ifile>&#32;
    <ifile title="OtherLinks">../../webpages/OtherLinks.xml</ifile>&#32;
    <ifile title="SiteDesign">../../webpages/SiteDesign.xml</ifile>&#32;
    <ifile title="Graduates">../../webpages/graduates.xml</ifile>&#32;
    <ifile title="AllPages">../../webpages/AllPages.xml</ifile>&#32;
    <ifile title="Office Hours">../../webpages/OfficeHours.xml</ifile>&#32;
    <notice title="Notices">../../webpages/notices.xml</notice>&#32;
    <html><a href="#contents">Contents</a></html>&#32;
  </hilight>

  <!-- <include src="CoursesNavBar.xml"/> -->

  <hilight>
    <ifile title="CSE681-SWMAA">../../webpages/CSE681.xml</ifile>&#32;
    <ifile title="CSE686-IP">../../webpages/CSE686.xml</ifile>&#32;
    <ifile title="CSE687-OOD">../../webpages/CSE687.xml</ifile>&#32;
    <ifile title="CSE775-DO">../../webpages/CSE775.xml</ifile>&#32;
    <ifile title="CSE776-DP">../../webpages/CSE776.xml</ifile>&#32;
    <ifile title="CSE778-AWP">../../webpages/CSE778.xml</ifile>&#32;
    <ifile title="CSE784-SWS">../../webpages/CSE784.xml</ifile>
  </hilight>

  <hilight>
    <ifile title="Lecture #01">../Lectures/CSE686CodeL1.xml</ifile>&#32;
    <ifile title="Lecture #02">../lectures/CSE686CodeL2.xml</ifile>&#32;
    <ifile title="Lecture #03">../Lectures/CSE686CodeL3.xml</ifile>&#32;
    <ifile title="Lecture #04">../Lectures/CSE686CodeL4.xml</ifile>&#32;
    <ifile title="Lecture #05">../Lectures/CSE686CodeL5.xml</ifile>&#32;<br/>
    <ifile title="Lecture #06">../Lectures/CSE686CodeL6.xml</ifile>&#32;
    <ifile title="Lecture #07">../Lectures/CSE686CodeL7.xml</ifile>&#32;
    <ifile title="Lecture #08">../Lectures/CSE686CodeL8.xml</ifile>&#32;
    <ifile title="Lecture #09">../Lectures/CSE686CodeL9.xml</ifile>&#32;
    <ifile title="Lecture #10">../Lectures/CSE686CodeL10.xml</ifile>&#32;
  </hilight>
  
  <hilight>
    <ifile title="Lab #01">../assignments/Assignment1.xml</ifile>&#32;
    <ifile title="Lab #02">../assignments/Assignment2.xml</ifile>&#32;
    <ifile title="Lab #03">../assignments/Assignment3.xml</ifile>&#32;
    <ifile title="Lab #04">../assignments/Assignment4.xml</ifile>&#32;
    <ifile title="Lab #05">../assignments/Assignment5.xml</ifile>&#32;
    <ifile title="Lab #06">../assignments/Assignment6.xml</ifile>&#32;
    <ifile title="Lab #07">../assignments/Assignment7.xml</ifile>&#32;
    <ifile title="Lab #08">../assignments/Assignment8.xml</ifile>&#32;
  </hilight>
  
  <hilight>
    <html><a href="#Contents">Contents</a></html>&#32;
    <html>
      <a href="../../webpages/cse686.xml#Syllabus">Syllabus</a>
    </html>&#32;
  </hilight>
  
  <section title="Web Resources:">
      <ilink title="Color Lab">www.visibone.com/colorlab</ilink>&#32;
      <ilink title="Color Codes">www.webmonkey.com/reference/color_codes</ilink>&#32;
      <ilink title="HTML tags">www.webmonkey.com/reference/html_cheatsheet</ilink>&#32;
      <ilink title="Everything&#160;HTML">www.htmlhelp.com</ilink>&#32;
      <ilink title="XML, HTML, Scripting">www.w3schools.com</ilink>&#32;
      <ilink title="Win32, COM, MFC">devCentral.iftech.com</ilink>&#32;
      <ilink title="webdeveloper.earthweb">webdeveloper.earthweb.com</ilink>&#32;
      <ilink title="devx...">archive.devx.com/projectcool/developer/dynamic/index.html</ilink>&#32;
      <ilink title="W3Schools">www.w3schools.com</ilink>&#32;
      <ilink title="Web Developer's Virtual Library">www.wdvl.com</ilink>&#32;
      <ilink title="World-Wide Web Consortium">www.w3c.org</ilink>&#32;
      <ilink title="WebReference">www.webreference.com</ilink>&#32;
      <ilink title="devCentral">devCentral.iftech.com</ilink>&#32;
  </section>
  
  <section title="Office Hours:">
    <ifile title="Instructor &amp; TAs">../../webpages/officeHours.xml</ifile>
  </section>

  <section title="Content:">
    This lecture is concerned with the Active Server Pages programming model.  We will see that 
    Web Applications are built in much the same way as WinForm programs.
    <olist>
      <litem>
        <html>
          <a href="../../webpages/cse686.xml#Syllabus">Syllabus</a> describes topics to be covered,
          reading material for you to digest <u>before coming to class</u>, and due dates
          for the assigned projects.
        </html>
      </litem>
      <litem>
        <ifile title="Final Project #1">../projects/FinalProj1Su10.doc</ifile>, 
        <ifile title="Final Project #2">../projects/FinalProj2Su10.doc</ifile>, 
        <ifile title="Final Project #3">../projects/FinalProj3Su10.doc</ifile><br/> 
      </litem>
      <litem>
        <file title="Running Projects downloaded from College Server">../presentations/RunningProjectsFromCollegeServer.doc</file>
      </litem>
      <litem>
        ASP Tutorials and References:
        <ind>
          <link title="w3schools">www.w3schools.com/aspnet/default.asp</link>
          <link title="aspAlliance">www.aspalliance.com/das/tutorial/default.aspx</link>
          <link title="asptutorial.info">www.asptutorial.info/</link>
          <link title="star developer">www.stardeveloper.com/articles/index.html</link>
        </ind>
      </litem>

    <!-- ASP -->
    <lhilight>
      <note><i>MSDN Asp Page Resources:</i></note><br/>
        <ilink title="Page Class">msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemwebuipagememberstopic.asp?frame=true</ilink>,&#32;
        <ilink title="Page Attributes">msdn.microsoft.com/library/default.asp?url=/library/en-us/cpgenref/html/cpconPage.asp</ilink>,&#32;
        <ilink title="Page Directives">msdn.microsoft.com/library/default.asp?url=/library/en-us/cpgenref/html/cpconPageDirectives.asp</ilink>,&#32;
        <ilink title="Page Code Render Blocks">msdn.microsoft.com/library/default.asp?url=/library/en-us/cpgenref/html/cpconCodeRenderBlocks.asp</ilink>,&#32;
        <ilink title="Page Code Declaration Blocks">msdn.microsoft.com/library/default.asp?url=/library/en-us/cpgenref/html/cpconcodedeclarationblocks.asp</ilink>,&#32;
        <br/>
      <note><i>Web Forms:</i></note><br/>
        <ilink title="Web Forms Syntax">msdn.microsoft.com/library/default.asp?url=/library/en-us/cpgenref/html/cpconasppagesyntax.asp</ilink>,&#32;
        <ilink title="Web Server Controls">msdn.microsoft.com/library/default.asp?url=/library/en-us/cpgenref/html/cpconaspsyntaxforwebcontrols.asp</ilink>,&#32;
        <ilink title="Html Server Controls">msdn.microsoft.com/library/default.asp?url=/library/en-us/cpgenref/html/cpconASPSyntaxForHTMLControls.asp</ilink>,&#32;
        <ilink title="Custom Server Control Syntax">msdn.microsoft.com/library/default.asp?url=/library/en-us/cpgenref/html/cpconcustomservercontrolsyntax.asp</ilink>,&#32;
    </lhilight>

      <llitem label="Asp.Net:">
        <tblock>
        <file title="Asp.Net Presentation #1">../Presentations/Asp1.ppt</file>
        <file title="Creating Virtual Directory for Downloaded Applications">../presentations/CreateVirtualDirectory-Vista.doc</file>
        <file title="Building ASP.Net Application with Visual Studio">../Presentations/AspWalkThrough.doc</file>
<!--
        <note>Note:</note><br/>
        aspx files on the new college server have been modified by replacing
        <br/>&#160;&#160;&lt;@ Page codebehind=&quot;somefile.aspx.cs&quot; ... @&gt;
        <br/>with
        <br/>&#160;&#160;&lt;@ Page src=&quot;somefile.aspx.cs&quot; ... @&gt;<br/>
        codebehind=&quot;somefile.aspx.cs&quot; attempts to load somefile.dll from the application's bin directory.  On the other hand,
        src=&quot;somefile.aspx.cs&quot; attempts to compile somefile.aspx.cs, create a temporary assembly, and load it.
        For some reason, the new server would not load a codebehind dll, but would compile the corresponding C# codebehind source.  This
        is probably due to the virtual directory not naming the application which tells the loader what to load.  I have not had time to
        sort all this out yet.
-->
        </tblock>
      </llitem>
      <llitem label="Migration from Asp to Asp.Net:">
        <tblock>
          <ilink title="AspApps code">www.ecs.syr.edu/faculty/fawcett/handouts/cse686/code/AspApps/</ilink>, 
          <ilink title="Pick Course Asp Application">www.ecs.syr.edu/faculty/fawcett/handouts/cse686/code/AspApps/BasicAsp/Pick.asp</ilink>, 
          <ilink title="Pick Course Aspx Application">128.230.208.37/su/handouts/cse686/code/AspApps/BasicAsp/PickAgain.aspx</ilink>,  
          <ilink title="Pick Form Aspx Application">fawcett.syr.edu/su/handouts/cse686/code/AspApps/PickCourse/PickForm.aspx</ilink>
        </tblock>
      </llitem>

      <llitem label="Page class and User Controls:">
        <tblock>
        <ilink title="Create Event Handlers">msdn.microsoft.com/en-us/library/6w2tb12s.aspx</ilink>,
        <ilink title="Page Events">msdn.microsoft.com/en-us/library/ms178472.aspx</ilink>,  
        <ilink title="OnLoad vs. Page_Load vs. Load Event">weblogs.asp.net/infinitiesloop/archive/2008/03/24/onload-vs-page-load-vs-load-event.aspx</ilink><br/>
        <ilink title="Page Lifecycle Demo">fawcett.syr.edu/su/handouts/cse686/code/LifeCycle/LifeCycle/LifeCycle.aspx</ilink>, 
        <ifile title="Page Lifecycle code">../code/lifecycle</ifile><br/>
        <ilink title="AspNetExamples - Basic">128.230.208.37/su/handouts/cse686/code/AspNetExamples/Default.aspx</ilink>, 
        <ilink title="AspNetExamples - Partition">128.230.208.37/su/handouts/cse686/code/AspNetExamples/Partition.aspx</ilink>, 
        <ilink title="AspNetExamples - Page Class Reflection">128.230.208.37/su/handouts/cse686/code/AspNetExamples/class.aspx</ilink>, 
        <ilink title="AspNetExamples&#160;code">www.ecs.syr.edu/faculty/fawcett/handouts/cse686/code/AspNetExamples/</ilink><br/> 
        <ilink title="Loading User Controls">128.230.208.37/su/handouts/cse686/code/LoadControl/LoadControl.aspx</ilink>, 
        <ifile title="Loading User Controls code">../code/LoadControl</ifile>
        </tblock>
      </llitem>
<!--
          <litem>
            This example is not working due to a security problem.  I'll fix it before next class.
            <ilink title="Form passes state to Form">128.230.208.37/su/handouts/cse686/code/EventExamples/NewForm/MainForm.aspx</ilink>
          </litem>
-->
      <llitem label="Examples useful for Final Project:">
        <tblock>
        <ifile title="AspExamples - code">../code/AspExamples/</ifile><br/>
        <ilink title="DataBind">128.230.208.37/su/handouts/cse686/code/AspExamples/DataBind/Bind.aspx</ilink>, 
        <ilink title="DownLoad File">128.230.208.37/su/handouts/cse686/code/AspExamples/DownLoadFiles/DownLoad.aspx</ilink><br/>
        <ifile title="AspNet worker process write and modify priviledges">../presentations/SecurityTabScreenShot.doc</ifile>,  
        <ilink title="Upload File">128.230.208.37/su/handouts/cse686/code/AspExamples/UploadFiles/UpLoad.aspx</ilink><br/>
        <ilink title="XMLReadAndWrite">128.230.208.37/su/handouts/cse686/code/AspExamples/XMLreadAndWrite/ProcessXML.aspx</ilink>
        </tblock>
      </llitem>

      <llitem label="Page Controls:">
        <tblock>
        <ilink title="HTMLServer Controls">128.230.208.37/su/handouts/cse686/code/AspControls/HTMLServerControls/HTMLServerControls.aspx</ilink>, 
        <ilink title="WebServer Controls">128.230.208.37/su/handouts/cse686/code/AspControls/WebServerControls/WebServerControls.aspx</ilink>, 
        <ilink title="UserControls">128.230.208.37/su/handouts/cse686/code/AspControls/UserControls/WebForm1.aspx</ilink>
        </tblock>
      </llitem>

      <llitem label="Experiments with Page Contents:">
        <tblock>
        <link title="Asp.Net Wiki prototype">128.230.208.37/SU/handouts/cse686/code/WikiProto/WikiProto.aspx</link>
        <file title="Wiki Prototype code">../code/WikiProto</file>
        </tblock>
      </llitem>
<!--
          <litem>
            <ilink title="Wiki (almost) no controls">128.230.208.37/su/handouts/cse686/code/nocontrols/test.aspx</ilink>, 
            <ifile title="Wiki (almost) no controls code">../../CSE691/code/nocontrols</ifile>
          </litem>
-->
      <llitem label="More Asp.Net Details:">
        <tblock>
          <file title="Asp.Net Presentation #2">../presentations/asppart2.ppt</file>
        </tblock>
      </llitem>
      <litem>
        <file title="Lab Assignment #3">../Assignments/Assignment3.xml</file><br/>
        Visual Studio (both 2008 and 2010) makes it easy to run Asp.Net applications - those with an aspx extension.  However,
        it turns out that you cannot run Asp scripts - those with an asp extension - in Visual Studio (neither VS2008 nor VS2010).
        However, you can edit them easily in Visual Studio 2010 and run from IIS.  Here are the steps:<p/>
        <ulist>
          <litem>
            Set up IIS to serve Asp applications.  Our TA Vinay has put together a description of how to do that
            <ifile title="here">../Presentations/VirtualDirectorySetUpProbsAndSolutions.doc</ifile>.
          </litem>
          <litem>
            Use note pad or the Visual Studio editor to create your Asp application (use a .asp extension).
          </litem>
          <litem>
            Create a virtual directory for your asp application.  The presentation
            <ifile title="here">../Presentations/VirtDirVista.doc</ifile> shows you how to do that for either Vista or Win7.
            The presentation <ifile title="here">../Presentations/VirtDirXP.doc</ifile> shows you how to do that for Windows XP,
            which is what the computers in CST 3-201 are running.
          </litem>
          <litem>
            Now, open a browser to the path: http://localhost/VirtualDirectoryName/AspFileName.asp.  You should see your application running.
            If you get errors the browser may silently do nothing or display an error page.  If that happens, comment out or remove the scripting
            parts and make sure you can see the rendering of the application's html.  Now piece by piece add back in the scripting parts, 
            viewing the results in the browser at each step.
            <p/>
            If you use the Chrome browser, on errors, you should be redirected to web pages that provide some resources for debugging.
          </litem>
        </ulist>
      </litem>
      <llitem label="Lab #2 Review"/>
      <llitem label="Lab #3 Review"/>
    </olist>
    <p/><hr/><p/>
  </section>  
  </visible>
</courses>
