Laste ned presentasjonen
Presentasjon lastes. Vennligst vent
PublisertHaldis Pedersen Endret for 9 år siden
1
1 | 2010 Internetteknologi 2 (ITNET2) Kort teknisk ASP.NET introduktion Mandag den 4/4 2011 Jesper Tørresø
2
ASP.NET ”Programmørernes websider” Eller rettere ASP.NET er webapplikationer hvor brugergrænsefladen er distribueret ud i en browser og logik, databaser etc. ligger bag en webserver (en http server). ASP.NET stiller sammen med webserveren et applikations-framework til rådighed. Visual Studio 2010 stiller en IDE til rådighed for dette framework
3
Domænet
4
Domæner og klasser i frameworket ”Styre showet”
5
Application Framework
6
Kontrol og tilstand Adgang til ”kontrolklasser” (En kontrol ændre en tilstand) Eksempler: HttpRuntime, HttpApplication Adgang til ”tilstandsklasser”,her kan fx placeres data med forskelligt scope (Data er tilstand) Eksempler : Application Session Request ViewState !!Der er forskellige adgange i Frameworket til den samme information eksempel!! System.Web.Hosting.HostingEnvironment.ApplicationPhysicalPath; AppDomain.CurrentDomain.BaseDirectory
7
Page Life Cycle Step by Step Page Request Start Page initialization Load Validation Postback Event Handling Rendering Unload (View and Control state)
8
Events i en “Page Cyclus”
9
Afprøv eksempel Fra følgende links http://www.altafkhatri.com/Technical/ASP_NET_Pag e_Life_Cycle_And_Events/Common_ASP_NET/Page_ Events Koden kan hentes på Campusnet
10
AutoEventWireup !!! AutoEventWireup="true" means that to wire up an event all you have to do is name the event in your.aspx page, like for a DropDownList: and in your code behind or in the script section: protected void ddl1_SelectedIndexChanged(object sender, EventArgs e) { } Without the autoeventwireup, you would have to subscribe to the event manually (wire up), for example, in your Page constructor: this.ddl1.SelectedIndexChanged += new EventHandler(ddl1_SelectedIndexChanged) So basically, the above line is done for you with AutoEventWireup="true" AutoPostBack="true" just means that when the textbox loses focus, if the contents have changed, the client's browser (thanks to javascript) will post the page. Above explanation from http://forums.asp.net/t/1386298.aspx.http://forums.asp.net/t/1386298.aspx
Liknende presentasjoner
© 2024 SlidePlayer.no Inc.
All rights reserved.