Presentation is loading. Please wait.

Presentation is loading. Please wait.

Introduction to ASP.Net ISYS 350. ASP.NET ASP.NET is a server-side technology for creating dynamic web pages. ASP.NET allows you to use a selection of.

Similar presentations


Presentation on theme: "Introduction to ASP.Net ISYS 350. ASP.NET ASP.NET is a server-side technology for creating dynamic web pages. ASP.NET allows you to use a selection of."— Presentation transcript:

1 Introduction to ASP.Net ISYS 350

2 ASP.NET ASP.NET is a server-side technology for creating dynamic web pages. ASP.NET allows you to use a selection of full programming languages. ASP.NET files have a.aspx extension.

3 Benefits of Server-Side Technology Browser compatibility: Every browser reads HTML. Protection of source code. Controls are server-side objects with properties, methods and events.

4 ASP.NET in the.NET Framework 1. The client requests a web page. 2. The web server locates the page. 3. If the page is an ASP.NET page, it is sent to the Common Language Runtime for compilation and execution. 4. The HTML produced by the CLR is returned to the browser.

5 Web Project File/New Website/ ASP.Net Application Website folder Web form: –default.aspx Design view and source (HTML) view –Default.Aspx.VB CodeBehind To set start up page: –Point to the web page in the Solution Explorer and right click to choose Set As Start Page.

6 Create a web page to add two numbers Web form flow layout: –Controls are positioned from left to right and from top to bottom. To control control’s position: –Format/Set position –Absolute –Relative Code Behind: –Separation of web page presentation and event procedures.

7 Future Value Add controls: –Textbox –Radiobutton –Listbox –Button

8 Web Form vs HTML Form HTML Form: A web page that contains one or more HTML form controls such as textbox, checkbox, dropdown list, and button inside an HTML tag. Web Form: A web page that contains: – ASP.NET server controls, and/or HTML form controls inside a tag. –ASP.NET code that produces dynamic content to be displayed within the web form.

9 Web Form Events Every time a page is called the page object goes through a series of stage: initializing, loading, processing and disposing of information. It happens every time a round trip to the server occurs. –Page_Init –Page_Load: Occurs when a page is visible. –Control Events –Page_Unload

10 ASP.NET Server Controls Intrinsic Controls: These controls correspond to their HTML counterparts. –Ex. Textbox, listbox, button, etc. Data-Centric Controls: Controls used for binding and displaying data from a data source, such as the DataGrid control. Rich Controls: Such as Calendar, AdRotator. Validation Controls: Such as RequiredFieldValidator. Namespace:System.Web.UI.Webcontrols

11 Example of ASP.Net Control Tag Textbox: – Properties: –Control type –ID –BackColor, ForeColor, Height, Width –Runat=“server”

12 ASP.Net Composite Controls DropdownList: –Control tag + ListItem tag Apple Orange Banana –Demo:TestListBox.aspx

13 Data Grid Creating bound DataGrid by dragging a table from the Server Explorer Access Data Source –Configure

14 Work with Multiple Pages Add a new form Add an existing form or page Change the starting web form Redirect or transfer to another page: –Server.Transfer(“page name”) –Response.Redirect(“page name”) –ImageButton PostBackURL property

15 Inline Coding Example The time is now <% dim iHour iHour=Now.Hour() if iHour < 12 then response.write(" good morning ") else response.write (" good afternoon ") end if %>

16 ADO.Net demo Creating listbox with CIDs


Download ppt "Introduction to ASP.Net ISYS 350. ASP.NET ASP.NET is a server-side technology for creating dynamic web pages. ASP.NET allows you to use a selection of."

Similar presentations


Ads by Google