IPT102 Week 2 Review to ASP.NET with Visual Studio PDF

Document Details

Uploaded by Deleted User

Quezon City University

Tags

ASP.NET Visual Studio programming web development

Summary

This document is a presentation on week 2 review to ASP.NET with Visual Studio. It covers topics such as dynamic websites, server controls, and properties. The presentation is likely part of an undergraduate course in web development.

Full Transcript

WEEK 2 (REVIEW TO ASP.NET WITH VISUAL STUDIO) IPT102 –INTEGRATIVE PROGRAMMING AND TECHNOLOGIES 2 To understand the Dynamic websites To review the different.Net Framework syntax To review the Visual Studio.NET programming...

WEEK 2 (REVIEW TO ASP.NET WITH VISUAL STUDIO) IPT102 –INTEGRATIVE PROGRAMMING AND TECHNOLOGIES 2 To understand the Dynamic websites To review the different.Net Framework syntax To review the Visual Studio.NET programming environment 2 CC101 - INTRODUCTION TO COMPUTING WEEK 2 – REVIEW TO ASP.NET WITH VISUAL STUDIO Introduction to Dynamic website A dynamic website is a website that displays different types of content every time a user views it. This display changes depending on a number of factors like viewer demographics, time of day, location, language settings, and so on. While static pages require manual updating before their contents change, dynamic websites offer unique content to visitors each time they view the site. This is done through a combination of client-side and server-side scripting. 3 IPT102 – INTEGRATIVE PROGRAMMING AND TECHNOLOGIES 2 WEEK 2 – REVIEW TO ASP.NET WITH VISUAL STUDIO Dynamic Web. (cont.) Client-side scripting, involves code that is executed by the viewer’s browser, using scripting languages like JavaScript. This scripting is responsible for rendering changes to the webpage as a response to actions taken within it, such as mouse clicks or keyboard use. Server-side scripting, on the other hand, refers to code that is executed by the server before sending the content to the viewer’s browser. This affects the webpage when it is loaded or visited, like with login pages, submission forms, and shopping carts. Note: Using both types of scripting allows modern websites to adapt to each user’s view of the page while reducing the server’s load time. 4 IPT102 – INTEGRATIVE PROGRAMMING AND TECHNOLOGIES 2 WEEK 2 – REVIEW TO ASP.NET WITH VISUAL STUDIO Dynamic Website Elements Format changing according to your screen size. Language changing according to what country you’re browsing from. Custom recommendations based on what you’ve viewed before Integration of social media and offsite content Dynamic visuals and animation displays. Note: Creating a dynamic websites allows you to elevate your page’s content to be more relevant and engaging for your visitors. 5 IPT102 – INTEGRATIVE PROGRAMMING AND TECHNOLOGIES 2 WEEK 2 – REVIEW TO ASP.NET WITH VISUAL STUDIO Benefits of Dynamic Websites More personalized browsing Easier to maintain Better user experience Elevated professional look Get with the Times and Get Moving Source: https://www.spiralytics.com/blog/what-are-dynamic-websites/ 6 IPT102 – INTEGRATIVE PROGRAMMING AND TECHNOLOGIES 2 WEEK 2 – REVIEW TO ASP.NET WITH VISUAL STUDIO Page Syntax The most basic page is just static text - Any HTML page can be renamed.aspx Pages may contain: Directives: Server controls: - Code blocks: … Data binding expressions: Server side comments: Render code: and Use is discouraged; use with code in event handlers instead 7 IPT102 – INTEGRATIVE PROGRAMMING AND TECHNOLOGIES 2 WEEK 2 – REVIEW TO ASP.NET WITH VISUAL STUDIO Server controls: 8 IPT102 – INTEGRATIVE PROGRAMMING AND TECHNOLOGIES 2 WEEK 2 – REVIEW TO ASP.NET WITH VISUAL STUDIO Server Control Syntax (cont.) Controls are small building blocks of the graphical user interface, which include text boxes, buttons, check boxes, list boxes, labels, and numerous other tools. Using these tools, the users can enter data, make selections and indicate their preferences. Controls are also used for structural jobs, like validation, data access, security, creating master pages, and data manipulation. ASP.NET uses five types of web controls, which are: HTML controls HTML Server controls ASP.NET Server controls ASP.NET Ajax Server controls User controls and custom controls 9 IPT102 – INTEGRATIVE PROGRAMMING AND TECHNOLOGIES 2 WEEK 2 – REVIEW TO ASP.NET WITH VISUAL STUDIO Properties of the Server Controls Tag attributes map to control properties Tags and attributes are case-insensitive Control properties can be set programmatically 10 IPT102 – INTEGRATIVE PROGRAMMING AND TECHNOLOGIES 2 WEEK 2 – REVIEW TO ASP.NET WITH VISUAL STUDIO Page Event Lifecycle 11 IPT102 – INTEGRATIVE PROGRAMMING AND TECHNOLOGIES 2 WEEK 2 – REVIEW TO ASP.NET WITH VISUAL STUDIO Types of controls for creating a user interface: ❑ HTML controls HTML controls are the native browser elements and they are part of HTML language. These are client side controls which is accessible only in the HTML page, so it will improve the performance of the web page. HTML controls on an ASP.NET Web page are not available to the web server. 12 IPT102 – INTEGRATIVE PROGRAMMING AND TECHNOLOGIES 2 WEEK 2 – REVIEW TO ASP.NET WITH VISUAL STUDIO Types of controls for creating a user interface: (Cont...) □ HTML server controls -The HTML server controls are HTML elements that include a runat=server attribute. The HTML server controls have the same HTML output and the same properties as their corresponding HTML tags. In addition, HTML server controls provide automatic state management and server-side events. runat directive is used to convert HTML elements to HTML server controls Ex. 13 IPT102 – INTEGRATIVE PROGRAMMING AND TECHNOLOGIES 2 WEEK 2 – REVIEW TO ASP.NET WITH VISUAL STUDIO Types of Web/HTML Server Controls – Basic controls – List controls – Rich controls – Validation controls 14 IPT102 – INTEGRATIVE PROGRAMMING AND TECHNOLOGIES 2 WEEK 2 – REVIEW TO ASP.NET WITH VISUAL STUDIO Basic Controls Correspond to HTML controls Supported controls 15 IPT102 – INTEGRATIVE PROGRAMMING AND TECHNOLOGIES 2 WEEK 2 – REVIEW TO ASP.NET WITH VISUAL STUDIO List Controls Controls that handle repetition Supported controls 16 IPT102 – INTEGRATIVE PROGRAMMING AND TECHNOLOGIES 2 WEEK 2 – REVIEW TO ASP.NET WITH VISUAL STUDIO Rich Controls Custom controls with rich functionality Supported Controls 17 IPT102 – INTEGRATIVE PROGRAMMING AND TECHNOLOGIES 2 WEEK 2 – REVIEW TO ASP.NET WITH VISUAL STUDIO Validation Controls Rich, declarative validation Validation declared separately from input control Extensible validation framework Supports validation on client and server – Avoids roundtrips when validating on client Server-side validation is always done – Prevents users from spoofing Web Forms 18 IPT102 – INTEGRATIVE PROGRAMMING AND TECHNOLOGIES 2 WEEK 2 – REVIEW TO ASP.NET WITH VISUAL STUDIO Using HTML Server Controls Control Name Usage Example Code Button Commonly used to respond to Click Reset Button Resets the values of all HTML controls. Submit Button It automatically POSTs the form data to FORM tag 19 IPT102 – INTEGRATIVE PROGRAMMING AND TECHNOLOGIES 2 WEEK 2 – REVIEW TO ASP.NET WITH VISUAL STUDIO Using HTML Server Controls Control Name Usage Example Code Text Field Mainly used for CheckBox Used for multiple number of options.

Use Quizgecko on...
Browser
Browser