1 / 10

Internetteknologi 2 (ITNET2 )

Internetteknologi 2 (ITNET2 ). Kort teknisk ASP.NET introduktion Mandag den 4/4 2011 Jesper Tørresø. ASP.NET ”Programmørernes websider”.

Download Presentation

Internetteknologi 2 (ITNET2 )

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 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”,herkan fx placeres data med forskelligt scope(Data er tilstand) • Eksempler : Application Session RequestViewState

  7. Page Life Cycle (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_Page_Life_Cycle_And_Events/Common_ASP_NET/Page_Events

  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: <asp:DropDownList id="ddl1" runat="server" SelectedIndexChanged="ddl1_SelectedIndexChanged" /> and in your code behind or in 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.

More Related