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

Slides:



Advertisements
Similar presentations
Master Pages, User Controls, Site Maps, Localization Svetlin Nakov Telerik Corporation
Advertisements

Module 8: Creating User Controls. Overview Adding User Controls to an ASP.NET Web Form Creating User Controls.
Tutorial 6 Creating a Web Form
Internetteknologi (ITNET2) Presentation 21: ASP.NET Advanced.
Chapter 10 Database Applications Copyright © 2011 by The McGraw-Hill Companies, Inc. All Rights Reserved. McGraw-Hill.
IT533 Lecture ASP.NET Controls. Installations Microsoft® SQL Server® 2008 Express.
11 ASP.NET Slides based off:. 22 B ACKGROUND - W EB A RCHITECTURE Web Server PC/Mac/Unix/... + Browser Client Server Request:
Computer Monitoring System for EE Faculty By Yaroslav Ross And Denis Zakrevsky Supervisor: Viktor Kulikov.
ASP.NET Data Binding. Slide 2 Lecture Overview Understanding the ASP.NET data binding model.
XP Browser and Basics1. XP Browser and Basics2 Learn about Web browser software and Web pages The Web is a collection of files that reside.
Chapter 12: ADO.NET and ASP.NET Programming with Microsoft Visual Basic.NET, Second Edition.
Web Development Using ASP.NET CA – 240 Kashif Jalal Welcome to week – 3-1 of…
ASP.NET Programming with C# and SQL Server First Edition
Chapter 14: Advanced Topics: DBMS, SQL, and ASP.NET
Browser and Basics Tutorial 1. Learn about Web browser software and Web pages The Web is a collection of files that reside on computers, called.
Developing an ASP.NET Application and using the Mobile Internet Toolkit Bart Vande Ghinste Developer Consultant Microsoft Belux.
Course Textbook: Build Your Own ASP.Net Website: Chapter 2
UNIVERSIDAD TECNOLÓGICA ECOTEC. ISO 9001:2008 Module 2 Creating Web Applications by Using Microsoft® Visual Studio 2010 and Microsoft.NET–Based Languages.
1 Web Developer & Design Foundations with XHTML Chapter 6 Key Concepts.
Some Basic Database Terminology
Chapter 8 Binding Data to Web Controls. ASP.NET 2.0, Third Edition2.
1 CS 3870/CS 5870 Static and Dynamic Web Pages ASP.NET and IIS.
Architecture Of ASP.NET. What is ASP?  Server-side scripting technology.  Files containing HTML and scripting code.  Access via HTTP requests.  Scripting.
Java Beans.
CIS 375—Web App Dev II ASP.NET 2 Introducing Web Forms.
Ch6:creating consistent looking web sites. Master pages Master page defines a combination of fixed content and content place holder to hold the web page(.aspx)
Database-Driven Web Sites, Second Edition1 Chapter 8 Processing ASP.NET Web Forms and Working With Server Controls.
1 CS 3870/CS 5870 Static and Dynamic Web Pages ASP.NET and IIS.
1 Presented by Bikash Shrestha. 2 What is ASP.NET or ASP+? ASP.NET/ASP+ is a programming framework built on the common language runtime that can be used.
Overview of Previous Lesson(s) Over View  ASP.NET Pages  Modular in nature and divided into the core sections  Page directives  Code Section  Page.
10-1 aslkjdhfalskhjfgalsdkfhalskdhjfglaskdhjflaskdhjfglaksjdhflakshflaksdhjfglaksjhflaksjhf.
ASP.Net Web Applications. Characteristics of a typical data driven web application Web Server HTML Graphics Active-X Java Applets HTTP Request ADO / JDBC.
Chapter 71 Building Data-Driven ASP.NET Applications Introduction to ASP.NET By Kathleen Kalata.
Web Development Using ASP.NET CA – 240 Kashif Jalal Welcome to week – 4-1 of…
Creating Web Applications Using ASP.NET Chapter Microsoft Visual Basic.NET: Reloaded 1.
Web Programming: Client/Server Applications Server sends the web pages to the client. –built into Visual Studio for development purposes Client displays.
ASP.NET Web Server Controls Basic Web Server Controls.
Integrating JavaScript and HTML5 HTML5 & CSS 7 th Edition.
Tutorial 121 Creating a New Web Forms Page You will find that creating Web Forms is similar to creating traditional Windows applications in Visual Basic.
DAT305 Boost Your Data-Driven Application Development Using SQL Server Centric.NET Code Generator Pascal Belaud Microsoft France.
AUTOMATION OF WEB-FORM CREATION - KINNERA ANGADI – MS FINAL DEFENSE GUIDANCE BY – DR. DANIEL ANDRESEN.
© FPT SOFTWARE – TRAINING MATERIAL – Internal use 04e-BM/NS/HDCV/FSOFT v2/3 Unit 3: Adding Code to a Microsoft ASP.NET Web Form.
Dr. Azeddine Chikh IS444: Modern tools for applications development.
Session 8: ADO.NET. Overview Overview of ADO.NET What is ADO.NET? Using Namespaces The ADO.NET Object Model What is a DataSet? Accessing Data with ADO.NET.
Lesson 2 What is ASP.NET? What is ASP.NET? What is Web Matrix? What is Web Matrix? What are the features of Web Matrix? What are the features of Web Matrix?
Chapter 8 Working With Databases in ASP.NET. Listing 8.1 – ShowListControls Uses The SqlDataSource control for estabishing database connectivity and.
Database Handling, Sessions, and AJAX. Post Back ASP.NET Functionality The IsPostBack method in ASP.NET is similar to the BlackBerry.refresh method –IsPostBack.
Module 4: Creating a Microsoft ASP.NET Web Form. Overview Creating Web Forms Using Server Controls.
Session 4: HTML and Web Server Controls. Outline Creating Web Forms Using Server Controls HTML Server Controls Web Server Controls Writing ASP Code Inline.
How the Web Works Building a Website – Lesson 1. How People Access the Web Browsers People access websites using software called a web browser. To view.
TRAINING SESSIONS.NET Controls.  Standard Controls  Label  Textbox  Checkbox  Button, Image Button, Image control  Radio Button  Literal  Hyperlink.
The Web Wizard’s Guide to HTML Chapter One World Wide Web Basics.
BlackBerry Applications using Microsoft Visual Studio and Database Handling.
Microsoft ® Official Course Developing a Publishing Site for Web Content Microsoft SharePoint 2013 SharePoint Practice.
Module 4: Creating a Web Application with Web Forms
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.
© FPT SOFTWARE – TRAINING MATERIAL – Internal use 04e-BM/NS/HDCV/FSOFT v2/3 Unit 11: Using server side control to display data in ASP.NET.
Headings are defined with the to tags. defines the largest heading. defines the smallest heading. Note: Browsers automatically add an empty line before.
Module 10: Data Access in ASP.NET. Overview Overview of the ASP.NET Data Access What is Data Access List of Data Source Control What is Data Bound How.
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 Course From Intermediate to Advance level By Arsalan Ahmed 3 Months Course Cell :
Stuff to memorise… "A method tells an object to perform an action. A property allows us to read or change the settings of the object."
Working with Data Lesson 4. Objectives DataSource Controls A requirement for most modern Web sites is that they be dynamic. –Static pages are not often.
Module 10: Creating a Web Application with Web Forms
Database Applications
Web Development Using ASP .NET
USER CONTROL.
4.01 How Web Pages Work.
Button Web Server Controls
Server Controls Validation Controls
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? Adding 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 (.ascx.vb or.ascx.cs )

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

Why Use User Controls? User controls offers many advantages when developing a Web application: User controls are self contained User controls provides separate variable namespaces, which means that none of the methods and properties of user control conflict with any existing methods or properties of the hosting page. User controls can be used more than once within the hosting page, without causing property and method conflicts. User controls can be written in a different language from the main hosting page. Eg: A user control is written in C# and Web form is written in VB.NET.

Why Use User Controls? The examples where a user control simplifies Web page development: Text box to only accept integers in a specific range. The user control would include validation controls. Data grid control that always connects to the same data source, to display data from a stored procedure or table. Grouping of text boxes and other controls to accept mailing information ( name, address, state, city, postcode) form user. Grouping of text boxes and other controls to accept contact information (home telephone number, business telephone number, mobile telephone, e- mail address) form user.

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

Adding a User Control Use Get and Set properties of the user control to expose the values of text box to the host. or 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

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

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

Exercise List TWO examples where a user control simplifies Web page development. How do you access the properties of a user control’s UI elements from the host page? How do you reference a user control from an ASP.NET Web form? Can you use two different user controls with the same name in the same ASP.NET page? How can you use a user control in two different Web applications?

3 lab execises this week.. 1: Data binding against object (use list-bound controls) 2: Using master pages and site navigation 3: Creating and using User Control

List-Bound Controls What is List-Bound Controls? Def 1 :- The controls that can be populated automatically with the data from a data source Def 2:- The controls that connect to a data source and display the data.

Examples : -CheckBoxList- Repeater -DataGrid -DataList -DropDownList -ListBox -RadioButtonList