ASP.NET User Controls Make your own controls by grouping other controls 1ASP.NET User Controls.

Slides:



Advertisements
Similar presentations
Tridion 5.3 Templates.
Advertisements

Malek Kemmou Technology Architect, Application Platform Microsoft Middle East and Africa Overview of ASP.NET 2.0.
1 Introduction to ASP.Net 4.0 Development David Ringsell MCSD MCT MCPD.
Unit 02. ASP.NET Introduction HTML & Server controls Postbacks Page Lifecycle.
Unit 1: Overview of the Microsoft.NET Platform
1 Unit 1: Introduction To.Net. 2 Introduction to.Net Integrated Development Environment (IDE) Languages in the.NET Framework The Common Language Runtime.
ASP.NET Ajax Supplementary Tutorial. Why Use ASP.NET AJAX? - I ASP.NET AJAX enables you to build rich Web applications that have many advantages over.
Microsoft Office SharePoint Portal Server 2007 Introduction to InfoPath Forms Services Daryl L. Rudolph.
Master Pages, User Controls, Site Maps, Localization Svetlin Nakov Telerik Corporation
Microsoft SharePoint 2010 technology for Developers
E-commerce can be seen below as a prototype.
Module 8: Creating User Controls. Overview Adding User Controls to an ASP.NET Web Form Creating User Controls.
11 Getting Started with ASP.NET Beginning ASP.NET 4.0 in C# 2010 Chapters 5 and 6.
User Controls, Master Pages, GridView. Content User Controls Styles, Themes, Master Pages Working with Data GridView Muzaffer DOĞAN - Anadolu University2.
Web Development in Microsoft Visual Studio Slide 2 Lecture Overview Introduce Visual Studio 2013 Create a first ASP.NET application.
ASP.NET Validating user input Validating user input on the client and/or server side 1ASP.NET Validating User Input.
On-Line Video Store Vitaly Panor Tal Joffe September, 2009 Project Supervisor: Victor Kulikov VTVS.
Powerful, modern desktops enable next generation applications Hardware acceleration brings real-time lighting, texturing and rendering Visual.
Microsoft Share Point 2007 Lela Castaneda. Microsoft Office SharePoint Designer 2007 top 10 benefits 1)Be more productive with next-generation Microsoft.
ACTIVE SERVER PAGES (ASP.NET) Bilal Munir Mughal 1 The plan.
Web Site Navigation How to get around in an ASP.NET web application 1Web Site Navigation.
Tutorial: Introduction to ASP.NET Internet Technologies and Web Application 4 th February 2010.
1 CS 3870/CS 5870 Static and Dynamic Web Pages ASP.NET and IIS.
.Net is a collection of libraries, templates and services designed to make programming applications of all kinds, easier, more flexible (multi platform),
ASP.NET AJAX 1. Ordinary web applications vs. AJAX Ordinary web application The full page is updated at each request The page is not available while being.
Programming with Microsoft Visual Basic 2012 Chapter 12: Web Applications.
Chapter 1 Getting Started with VB.NET and Crystal Reports Debbie St. George Wonder Ranch Publishing DBA/Programmer Covington Visual Studio.Net User Group.
ASP.NET Web Application and Development Digital Media Department Unit Credit Value : 4 Essential Learning time : 120 hours Digital.
Web Programming: Client/Server Applications Server sends the web pages to the client. –built into Visual Studio for development purposes Client displays.
Introduction to ASP.NET 1www.tech.findforinfo.com.
CSCI 6962: Server-side Design and Programming Introduction to Active Server Pages.
DotNetNuke v3 Overview Stan Schultes Stan Schultes Enterprise architect / application developer Enterprise architect / application developer Conference.
C# Tutorial -1 ASP.NET Web Application with Visual Studio 2005.
Jon Galloway | Development Platform Evangelist Christopher Harrison | Microsoft Certified Trainer.
Introduction In The Name Of Allah, The Beneficent, The Merciful.
DataSource controls in.NET How to access databases.
Introduction to ASP.NET T.Ahlam Algharasi. The Visual Studio IDE Start page 2.
CIS 451: ASP.NET Concepts Dr. Ralph D. Westfall January, 2009.
Web User Controls This presentation will cover the basics of defining, creating and using a web user control. Presented to Twin Cities.NET user group By.
Web Development in Microsoft Visual Studio Slide 2 Lecture Overview How to create a first ASP.NET application.
Module 2: Using Microsoft Visual Studio.NET. Overview Overview of Visual Studio.NET Creating an ASP.NET Web Application Project.
Microsoft ASP.NET Beginning Object-Oriented Web Design Bryan Jenks © Integrated Ideas 2005.
BlackBerry Applications using Microsoft Visual Studio and Database Handling.
Building an ASP.NET Website OUTLINE DIFFERENT PROJECT TYPES. DIFFERENT PROJECT TEMPLATES. NUMEROUS FILE TYPES AVAILABLE IN ASP.NET. CREATING STRUCTURED.
1 © Xchanging 2010 no part of this document may be circulated, quoted or reproduced without prior written approval of Xchanging. MOSS Training – SharePoint.
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.
Web Development in Microsoft Visual Studio 2013 / 2015.
Chapter 27 Getting “Web-ified” (Web Applications) Clearly Visual Basic: Programming with Visual Basic nd Edition.
11 Getting Started with ASP.NET Beginning ASP.NET in C# and VB Chapters 1 and 2.
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.
11 User Controls Beginning ASP.NET in C# and VB Chapter 8.
Customizing WebLink Lab 208 Alex Huang. Table of Contents Introduction – What is WebLink Disclaimer Customization Basics and Exercises Resources Questions.
 Lecture  Website language: ASP.net  Book name Beginning ASP.NET 4 in C# and VB 2.
Chapter 2 Creating Website with Web Forms. Objectives Understand the different project types and templates when building ASP.NET web sites. The different.
Creating Consistent Looking Websites
Introduction to ASP.NET Web Forms
Dive Into® Visual Basic 2010 Express
ASP.NET Forms.
© 2016, Mike Murach & Associates, Inc.
Chapter 8 User Controls.
9/22/2018 Session 8.1 Course Overview Intro to ASP.NET
Module 1: Getting Started
Design and Consume DataWindows in Visual Studio 2005
Web Development in Microsoft Visual Studio 2013
Beginning Object-Oriented Web Design
04 | Web Applications Gerry O’Brien | Technical Content Development Manager Paul Pardi | Senior Content Publishing Manager.
Introduction to ASP.NET MVC ASP.NET MVC පෙරවදන
AJAX Rehab AlFallaj.
Master Pages & Themes.
USER CONTROL.
Presentation transcript:

ASP.NET User Controls Make your own controls by grouping other controls 1ASP.NET User Controls

What is a User Control? A user controls is a grouping of other server controls into a single-container control – User controls are composite – A user control contains child controls 2ASP.NET User Controls

How to create a User Control? Make a new folder ”Controls” Create a New Item -> User Control – Filename.ascx User controls are designer friendly – You can drag-and-drop child controls from the Visual Studio Toolbox to the control 3ASP.NET User Controls

When to create a User Control? A User Control is useful, if you have a set of controls that appears on many pages. You aggregate the individual controls in a new user control The user control can then be used in a number of pages 4ASP.NET User Controls

Using a user control Using a User Controls is like using any other server control User controls can be used wherever you can user other kinds of controls, like – Web forms – Master pages – Other (bigger) user controls User control must be registered – Register in single page – Register in web.xml 5ASP.NET User Controls

User control registration To use a User Control the User Control must be registered. Registration can be done in two places – In the file using the User Control – In web.xml Site-Wide registration 6ASP.NET User Controls

Site-Wide registration of user controls in web.config … … 7ASP.NET User Controls

User Control Properties User Controls can have properties Properties are declared in the code-behind of the user control Set in the page that uses the User Control – Declaratively from the page using the User Control – Programmatically from the code-behind of the page using the User Control – Get the value in the code-behind 8ASP.NET User Controls

User control events User controls can have events – Just like ordinary controls – Example: Events from sub-controls can be propagated to the user control Called ”Event Bubbling” – Event arguments can be empty, or carry data. Example: usercontrol/loginusercontrol ASP.NET User Controls9

Best practices Don’t overuse user controls – User controls encapsulate repeating content – UI + code spread over more files A user controls should focus on a single task Don’t hardcode style info (CSS) in a user control – Make a CssClass property for the user control ASP.NET User Controls10

Further reading, etc. Imar Spaanjaars Beginning ASP.NET 4 in C# and VB, Wrox 2010 – Chapter 8 User Controls, page ASP.NET User controls (video 1:19 min) – – User-Controls User-Controls Chris Peels Create a Custom User Control in ASP.NET (video 27 min, VB), 2007 – control-in-aspnet control-in-aspnet Bill Evjen et al. Professional ASP.NET 4 in C# and VB, Wrox 2010 – Chapter 25 User and Server Controls, page George Shepherd Microsoft ASP.NET 4 Step by Step, Microsoft Press 2010 – Chapter 5 Composite Controls, page ASP.NET User Controls