Module 8: Creating User Controls. Overview Adding User Controls to an ASP.NET Web Form Creating User Controls.

Slides:



Advertisements
Similar presentations
Module 1: Creating an Application by Using Windows Presentation Foundation Overview of WPF Creating a Simple WPF Application Handling Events and Commands.
Advertisements

Unit 02. ASP.NET Introduction HTML & Server controls Postbacks Page Lifecycle.
Unit 1: Overview of the Microsoft.NET Platform
Module 1: Creating Responsive Pages with Ajax Creating Partial-Page Updates by Using AJAX Scripting Actions on the Web Client.
Patrick J. Santry Microsoft ASP.NET MVP wwwCoder.com.
Intesar G Ali IT DepartmentPalestinian Land Authority Web services Prepared by: Intesar Ali IT Department PLA August 2010.
Master Pages, User Controls, Site Maps, Localization Svetlin Nakov Telerik Corporation
IT533 Lectures Validation Controls, User Controls, Master Pages.
ASP.NET User Controls Make your own controls by grouping other controls 1ASP.NET User Controls.
Forms Authentication, Users, Roles, Membership Ventsislav Popov Crossroad Ltd.
INTRODUCTION TO ASP.NET MVC AND EXAMPLE WALKTHROUGH RAJAT ARYA EFECS - OIM DAWG – 4/21/2009 ASP.NET MVC.
Internetteknologi (ITNET2) Presentation 21: ASP.NET Advanced.
Web Forms and ASP.NET Programming Right from the Start with Visual Basic.NET 1/e 12.
 Copyright Wipro Technologies JSP Ver 1.0 Page 1 Talent Transformation Java Server Pages.
28/1/2001 Seminar in Databases in the Internet Environment Introduction to J ava S erver P ages technology by Naomi Chen.
1 Software Testing and Quality Assurance Lecture 32 – SWE 205 Course Objective: Basics of Programming Languages & Software Construction Techniques.
Overview of ASP.NET Prepared By : Lec : Zalak Thakrar Follow Me on
1 Chapter 20 — Creating Web Projects Microsoft Visual Basic.NET, Introduction to Programming.
CPSC 203 Introduction to Computers Lab 39, 40 By Jie (Jeff) Gao.
UNIVERSIDAD TECNOLÓGICA ECOTEC. ISO 9001:2008 Module 2 Creating Web Applications by Using Microsoft® Visual Studio 2010 and Microsoft.NET–Based Languages.
1 CS 3870/CS 5870 Static and Dynamic Web Pages ASP.NET and IIS.
1 Round Robin Interface LCA e-Learning Cascade Web Site Flavio Fontana ENEA Usability Lab CASCADE Review Meeting, November 2004, Bologna, Italy.
DR.JOHN ABRAHAM PROFESSOR UTPA ASP.NET. ACTIVE SERVER PAGES (ASP) Web application development environment Web applications use web browser to display.
Introduction to DotNetNuke Scott McCulloch DotNetNuke Core Team
Overview of Previous Lesson(s) Over View  ASP.NET Pages  Modular in nature and divided into the core sections  Page directives  Code Section  Page.
Lesley Bross, August 29, 2010 ArcGIS 10 add-in glossary.
Programming with Microsoft Visual Basic 2012 Chapter 12: Web Applications.
Java Programming, 3e Concepts and Techniques Chapter 3 Section 65 – Manipulating Data Using Methods – Java Applet.
INSPIRING CREATIVE AND INNOVATIVE MINDS Module 4: Adding Code to a Microsoft ASP.NET Web Form Implementing Code-Behind Pages Adding Event Procedures to.
Using FrontPage Express. Slide 1 Standard toolbars and menus Time indicator: gives an approximation of download time of the page.
Developing Web Applications Using Microsoft ® Visual Studio ® 2008.
Introduction to ASP.NET 1www.tech.findforinfo.com.
ASP.NET application. Roadmap ASP.NET file types Bin directory Application updates Simple application from start to finish using a virtual directory Behind.
CSCI 6962: Server-side Design and Programming Introduction to Active Server Pages.
Integrated Development Environment (IDE)
Murach’s ASP.NET 4.0/VB, C1© 2006, Mike Murach & Associates, Inc.Slide 1.
Cross-Language Demo Demonstrates mixing C# and VB.NET code C# Class CSDemoClass.cs VB.NET Class VBDemoClass.vb “Main” class (C#) Demo.cs.
© FPT SOFTWARE – TRAINING MATERIAL – Internal use 04e-BM/NS/HDCV/FSOFT v2/3 Unit 3: Adding Code to a Microsoft ASP.NET Web Form.
Session 4: HTML and Web Server Controls. Outline Creating Web Forms Using Server Controls HTML Server Controls Web Server Controls Writing ASP Code Inline.
Module 1: Working with ASP.NET. Overview Introducing ASP.NET Creating Web Forms Adding ASP.NET Code to a Page Handling Page Events Discussion: ASP vs.
Module 2: Using Microsoft Visual Studio.NET. Overview Overview of Visual Studio.NET Creating an ASP.NET Web Application Project.
Christopher M. Pascucci.NET Programming CodeBehind.
Module 8: Creating User Controls. Overview Adding User Controls to an ASP.NET Web Form Creating User Controls.
Module 14 Application Settings, State, and Life Cycle.
Microsoft ® Official Course Developing a Publishing Site for Web Content Microsoft SharePoint 2013 SharePoint Practice.
Introduction to ASP.NET What is ASP.NET and how is different from ASP –ASP: server side technology for creating dynamic web pages using scripting languages.
ASP.NET User Controls. User Controls In addition to using Web server controls in your ASP.NET Web pages, you can create your own custom, reusable controls.
ASP. ASP is a powerful tool for making dynamic and interactive Web pages An ASP file can contain text, HTML tags and scripts. Scripts in an ASP file are.
Chapter 27 Getting “Web-ified” (Web Applications) Clearly Visual Basic: Programming with Visual Basic nd Edition.
COMPUTER III. Fundamental Concepts of Programming Control Structures Sequence Selection Iteration Flowchart Construction Introduction to Visual Basic.
1111 Creating HTML Programatically Objectives You will be able to Invoke C# code on the server from an ASP.NET page. Write C# code to create HTML.
1 Introduction to Web Application Review. 2 Five Layers Architecture HTML, CSS, Java Script ASP.net User ’ s.dll, Nunit, Web Services ADO.net SQL Server,
11 User Controls Beginning ASP.NET in C# and VB Chapter 8.
Introduction to ASP.NET development. Background ASP released in 1996 ASP supported for a minimum 10 years from Windows 8 release ASP.Net 1.0 released.
ASP.NET Architecture Mike Taulty Developer & Platform Group Microsoft Ltd
Your Best Friend Cooking Assistant and Educational Resource Learner: Tim Bair Advisor: Dr. Hazem Said a time-saving tool for meal planning, grocery shopping,
Section 10.1 Define scripting
Computing with C# and the .NET Framework
ASP.NET Forms.
© 2016, Mike Murach & Associates, Inc.
Active Server Pages Computer Science 40S.
Introduction to ASP By “FlyingBono” 2009_01 By FlyingBono 2009_01
© 2016, Mike Murach & Associates, Inc.
Module 0: Introduction Chapter 2: Getting Started
Module 1: Getting Started
Web Development in Microsoft Visual Studio 2013
Creating a Windows Application Project in Visual Studio
USER CONTROL.
ASP.NET Imran Rashid CTO at ManiWeber Technologies.
11.1 Applets & graphics.
Presentation transcript:

Module 8: Creating User Controls

Overview Adding User Controls to an ASP.NET Web Form Creating User Controls

Lesson: Adding User Controls to an ASP.NET Web Form What is a User Control? Why Use User Controls? Practice: Listing User Controls Adding a User Control Demonstration: Creating a User Control

What is a User Control? User controls simplify the reuse of code and UI components within a Web application A user control is a user-defined Web server control with an.ascx extension Contains HTML, but not the,, or tags or Contains code to handle its own events

Why Use User Controls? Reuse user interface and code Page2.aspx Control1.ascx Page1.aspx Page3.aspx Application AApplication B

Practice: Listing User Controls Students will: List examples of when it is appropriate to use user controls Time: 5 minutes

Adding a User Control Use Register directive to include a user control in an ASP.NET Page Insert the user control in a Web Form Use Get and Set properties of the user control or Register TagPrefix="demo" TagName="validNum" Src="numberbox.ascx" %> Register TagPrefix="demo" TagName="validNum" Src="numberbox.ascx" %> num1.pNum = 5 'uses Set x = num1.pNum 'uses Get num1.pNum = 5 'uses Set x = num1.pNum 'uses Get num1.pNum = 5; //uses Set x = num1.pNum; //uses Get num1.pNum = 5; //uses Set x = num1.pNum; //uses Get

Demonstration: Creating a User Control Create a new user control Create a property

Lesson: Creating User Controls Creating a User Control Demonstration: Using a User Control

Creating a User Control Two methods for user control creation: Create a new user control using Visual Studio.NET Convert an existing ASP.NET page to a user control Host page interacts with the control using properties Host page should use flow layout Public Property pNum() As Integer Get Return Convert.ToInt32(txtNum.Text) End Get Set (ByVal value As Integer) txtNum.Text = CStr(value) End Set End Property Public Property pNum() As Integer Get Return Convert.ToInt32(txtNum.Text) End Get Set (ByVal value As Integer) txtNum.Text = CStr(value) End Set End Property public int pNum { get { return Convert.ToInt32(txtNum.Text); } set { txtNum.Text = Convert.ToString(value); } public int pNum { get { return Convert.ToInt32(txtNum.Text); } set { txtNum.Text = Convert.ToString(value); }

Demonstration: Using a User Control Insert a user control on a page Use the user controls in the code-behind page

Review Adding User Controls to an ASP.NET Web Form Creating User Controls

Lab 8: Creating User Controls Medical Medical.aspx Benefits Home Page Default.aspx Life Insurance Life.aspx Retirement Retirement.aspx Dental Dental.aspx Dentists Doctors Doctors.aspx Doctors Logon Page Login.aspx Logon Page Login.aspx Registration Register.aspx Registration Register.aspx Coho Winery Prospectus Prospectus.aspx XML Web Service dentalService1.asmx Page Header Header.ascx ASPState tempdb Lab Web Application User Control namedate.ascx Menu Component Class1.vb or Class1.cs XML Files Web. config