Difference between revisions of "Intro Week 12"

esse quam videri
Jump to: navigation, search
m (Text replacement - "<csharp>" to "<syntaxhighlight lang="csharp" line="1" >")
m (Text replacement - "</csharp>" to "</syntaxhighlight>")
Line 26: Line 26:
 
Console applications start executing in the main method
 
Console applications start executing in the main method
  
<syntaxhighlight lang="csharp" line="1" >public static void Main() {}</csharp>
+
<syntaxhighlight lang="csharp" line="1" >public static void Main() {}</syntaxhighlight>
  
 
The .Net Framework can also execute on the web. Rather than having a Main method a web page starts it's execution with a method called Page_Load
 
The .Net Framework can also execute on the web. Rather than having a Main method a web page starts it's execution with a method called Page_Load
  
<syntaxhighlight lang="csharp" line="1" >public Page_Load { }</csharp>
+
<syntaxhighlight lang="csharp" line="1" >public Page_Load { }</syntaxhighlight>
  
 
==Demo==
 
==Demo==

Revision as of 18:29, 25 January 2016

Review Art Quiz Homework

Types of controls

Separate interface controls form model domain classes.

ASP.NET

Anatomy of an aspx page

Page Directive The page directive must be on the first line of an aspx page. It consists of Name/Value Pairs and sets parameters that will be used throughout the execution of the page ie. the language.

<%@ Page language="c#" debug="True" trace="False"%>

C# Code may be embedded in the page using script tags similar to javascript

<script language="c#" runat="server"> </script>

Notice the run at attribute is set to 'server'. This is what makes the code execute on the server rather than be parsed by the client.

Console applications start executing in the main method

1 public static void Main() {}

The .Net Framework can also execute on the web. Rather than having a Main method a web page starts it's execution with a method called Page_Load

1 public Page_Load { }

Demo

Create a folder in your pub folder called 'ITP'.

Use Visual Studio to open your folder as a website

Home Work

Make a better than mine Windows Art Quizer spectacularrrr

Make me a web page and post it in http://iam.colum.edu/student/YouLogonName/ITP/TheBestPageEva.aspx you must impress me with your creatititytyness so I will let you make a funky fresh final project