Asp.net.

Slides:



Advertisements
Similar presentations
Tutorial 6 Creating a Web Form
Advertisements

Asp.NET Core Vaidation Controls. Slide 2 ASP.NET Validation Controls (Introduction) The ASP.NET validation controls can be used to validate data on the.
web controls  standard controls  validation controls  rich controls.
Basics of ASP.NET. 2 © UW Business School, University of Washington 2004 Outline Installing ASP.NET and Web Matrix Data Types Branching Structure Procedures.
Web Development Using ASP.NET CA – 240 Kashif Jalal Welcome to week – 3-1 of…
ASP.NET Validating user input Validating user input on the client and/or server side 1ASP.NET Validating User Input.
1 An Introduction to Visual Basic Objectives Explain the history of programming languages Define the terminology used in object-oriented programming.
ASP.NET Programming with C# and SQL Server First Edition
Form Handling, Validation and Functions. Form Handling Forms are a graphical user interfaces (GUIs) that enables the interaction between users and servers.
Chapter 9 Collecting Data with Forms. A form on a web page consists of form objects such as text boxes or radio buttons into which users type information.
Tutorial: Introduction to ASP.NET Internet Technologies and Web Application 4 th February 2010.
Database-Driven Web Sites, Second Edition1 Chapter 8 Processing ASP.NET Web Forms and Working With Server Controls.
Module 7: Validating User Input.
.NET Validation Controls MacDonald Ch. 8 MIS 324 MIS 324 Professor Sandvig Professor Sandvig.
Chapter 3 Using Validation Controls. What is a Validation Control? A control that validates the value in another control Renders as an HTML tag with an.
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.
An Introduction to ASP.NET Ed Dunhill blogs.msdn.com/edunhill SLIDE7.
Telerik Software Academy ASP.NET Web Forms Data Validation, Data Validators, Validation Groups Telerik Software Academy
Overview of Previous Lesson(s) Over View  Server controls are small building blocks of the graphical user interface, which includes  Text boxes  Buttons.
Overview of Previous Lesson(s) Over View  ASP.NET Pages  Modular in nature and divided into the core sections  Page directives  Code Section  Page.
Module 1: Introduction to C# Module 2: Variables and Data Types
Programming with Microsoft Visual Basic 2012 Chapter 12: Web Applications.
1 ASP.NET ASP.NET Rina Zviel-Girshin Lecture 3. 2 Overview Cookies Validation controls Client and server side validation Validation control examples.
Web Application and Development Digital Media Department Unit Credit Value : 4 Essential Learning time : 120 hours Digital Media.
Web Development Using ASP.NET CA – 240 Kashif Jalal Welcome to week – 4-1 of…
ASP.Net, Web Forms and Web Controls 1 Outline Web Controls Text and Graphics Controls AdRotator Control Validation Controls.
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.
Web Controls Chapter-7. Page  2 Synopsis  Stepping Up to Web controls  Basic Web control classes  Web control classes  Web control Base class  Units,
© Minder Chen, ASP.NET 2.0: Introduction - 1 ASP.NET 2.0 Minder Chen, Ph.D. Framework Base Class Library ADO.NET: Data & XML.
Validation and Rich controls 1www.tech.findforinfo.com.
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.
Microsoft Visual Basic 2008 CHAPTER SEVEN Creating Web Applications.
Tutorial 7 Creating Forms. Objectives Session 7.1 – Create an HTML form – Insert fields for text – Add labels for form elements – Create radio buttons.
ASP.NET.. ASP.NET Environment ASP.NET is Microsoft's programming framework that enables the development of Web applications and services. It is an easy.
Microsoft Visual Basic 2005 CHAPTER 7 Creating Web Applications.
Chapter 8 Collecting Data with Forms. Chapter 8 Lessons Introduction 1.Plan and create a form 2.Edit and format a form 3.Work with form objects 4.Test.
ASP.NET OPTIMIZATION. Why Optimize? $$$ Whether you build applications for customers or not, enhanced applications save money.
Lesson 12 Adding Validation To The Movie Database.
AUC Technologies Projects Consulting, Development, Mentoring, and Training Company ASP.NET Validation Control Presented By : Muhammad Atif Hussain Deputy.
VALIDATION CONTROLS.  Validation Controls are primarily used to validate, or verify the data entered by user into a web form.  Validation controls attempt.
Session 6: Validating User Input. Outline Overview of User Input Validation Client-Side and Server-Side Validation ASP.NET Validation Controls Using Validation.
© FPT SOFTWARE – TRAINING MATERIAL – Internal use 04e-BM/NS/HDCV/FSOFT v2/3 User Input Validating.
8 Chapter Eight Server-side Scripts. 8 Chapter Objectives Create dynamic Web pages that retrieve and display database data using Active Server Pages Process.
Vijayalakshmi G M Validation Controls.
Text INTRODUCTION TO ASP.NET. InterComm Campaign Guidelines CONFIDENTIAL Simply Server side language Simplified page development model Modular, well-factored,
Beginning ASP.NET in C# and VB Chapter 9
Tutorial 6 Creating a Web Form
Validation Controls Assist your users with providing the correct type of input for your application Assist your users with providing the correct type of.
.NET MCQs MULTIPLE CHOICE QUESTION
Validation & Rich Controls
In this session, you will learn to:
Web Application Web Application are programs that can be executed either on a Web server or in a Web browser. An Online store accessed through a browser.
Basic XHTML Tables XHTML tables—a frequently used feature that organizes data into rows and columns. Tables are defined with the table element. Table.
Unit 27 - Web Server Scripting
Variables and Arithmetic Operations
Social Media And Global Computing Introduction to Visual Studio
WEB PROGRAMMING JavaScript.
12/9/2018 Session 9.1 Calendar and Validation Controls Using Sessions
Building ASP.NET Applications
PART 2.
Module 05: Building ASP .NET Applications
Web Development Using ASP .NET
Chapter 9 Programming with Web Forms
DOT NET ARCHITECTURE (OR) DOT NET FRAME WORK ARCHITECTURE
MIS 3200 – Unit 2.2 Outline What’s the problem with bad data?
Programming with Microsoft Visual Basic 2008 Fourth Edition
.NET Validation Controls
IS 135 Business Programming
Validation & Rich Controls
Presentation transcript:

Asp.net

BASE CLASS LIBRARY .NET Framework Class Library is the collection of classes, namespaces, interfaces and value types that are used for .NET applications.

CLR .NET CLR is a run-time environment that manages and executes the code written in any .NET programming language. It converts code into native code which further can be executed by the CPU.

STRUCTURE

It converts program into native code. Handles Exceptions FUNCTIONS: It converts program into native code. Handles Exceptions Provides type safety Memory management Provides security Improved performance Language independent Platform independent Garbage collection

CTS The Common Type System (CTS) is a standard for defining and using data types in the .NETframework. CTS defines a collection of data types, which are used and managed by the run time to facilitate cross-language integration. In contrast to low-level languages like C and C++ where classes/structs have to be used for defining types often used (like date or time), CTS provides a rich hierarchy of such types without the need for any inclusion of header files or libraries in the code.

CTS is a specification created by Microsoft and included in the European Computer Manufacturer‘s Association standard. CTS is designed as a singly rooted object hierarchy with System.Object as the base type from which all other types are derived. CTS supports two different kinds of types:  Value Types: Contain the values that need to be stored directly on the stack or allocated inline in a structure. Reference Types: Store a reference to the value‘s memory address and are allocated on the heap. 

NAMESPACES A namespace is a declarative region that provides a scope to the identifiers (the names of types, functions, variables, etc) inside it.   Namespaces Description System It includes all common datatypes, string values, arrays and methods for data conversion. System.IO, System.DirectoryServices, System.IO.IsolatedStorage These are used to access, read and write files.

Namespaces Description System.Net, System.Net.Sockets These are used to communicate over the Internet when creating peer-to-peer applications. System.Windows.Forms, System.Windows.Forms.Design These namespaces are used to create Windows-based applications using Windows user interface components. System.Diagnostics It is used to debug and trace the execution of an application.

INTERMEDIATE CODE Intermediate language (IL) is an object-oriented programming language designed to be used by compilers for the .NET Framework before static or dynamic compilation to machine code. The IL is used by the .NET Framework to generate machine-independent code as the output of compilation of the source code written in any .NET programming language. This term is also known as Microsoft intermediate language (MSIL) or common intermediate language (CIL).

With the help of a suitable just-in-time (JIT) compiler, IL code can be executed on any computer architecture supported by the JIT compiler. JIT compilation provides better performance, preserves memory, and saves time during application initialization. The two tools associated with IL code are the MSIL Assembler (Ilasm.exe) and the MSIL Disassembler (Ildasm.exe). The former(MSIL Assembler) generates a portable executable file from IL code and permits viewing the IL code in human-readable format.

The latter(MSIL Disassembler) converts a portable executable file back to a text file, for viewing and modification. Both are automatically installed as part of Visual Studio.

VALIDATION CONTROLS ASP.NET validation controls validate the user input data to ensure that useless, unauthenticated, or contradictory data don't get stored. ASP.NET provides the following validation controls: RequiredFieldValidator RangeValidator CompareValidator RegularExpressionValidator CustomValidator ValidationSummary

REQUIRED FIELD VALIDATOR The RequiredFieldValidator control ensures that the required field is not empty. It is generally tied to a text box to force input into the text box. SYNTAX: <asp:RequiredFieldValidator ID="rfvcandidate" runat="server" ControlToValidate ="ddlcandidate" ErrorMessage="Please choose a candidate" InitialValue="Please choose a candidate"> </asp:RequiredFieldValidator>

RangeValidator Control The RangeValidator control verifies that the input value falls within a predetermined range. It has three specific properties: Properties Description Type It defines the type of the data. The available values are: Currency, Date, Double, Integer, and String. MinimumValue It specifies the minimum value of the range. MaximumValue It specifies the maximum value of the range.

CompareValidator Control The CompareValidator control compares a value in one control with a fixed value or a value in another control. It has the following specific properties: Properties Description Type It specifies the data type. ControlToComp are It specifies the value of the input control to compare with. ValueToCompar e It specifies the constant value to compare with. Operator It specifies the comparison operator, the available values are: Equal, NotEqual, GreaterThan, GreaterThanEqual, LessThan, LessThanEqual, and DataTypeCheck.

RegularExpressionValidator The RegularExpressionValidator allows validating the input text by matching against a pattern of a regular expression. The regular expression is set in the ValidationExpression property. The following table summarizes the commonly used syntax constructs for regular expressions:

Character Escapes Description \b Matches a backspace. \t Matches a tab. \r Matches a carriage return. \v Matches a vertical tab. \f Matches a form feed. \n Matches a new line. \ Escape character.

Apart from single character match, a class of characters could be specified that can be matched, called the metacharacters. Metacharacters Description . Matches any character except \n. [abcd] Matches any character in the set. [^abcd] Excludes any character in the set. [2-7a-mA-M] Matches any character specified in the range. \w Matches any alphanumeric character and underscore. \W Matches any non-word character. \s Matches whitespace characters like, space, tab, new line etc. \S Matches any non-whitespace character. \d Matches any decimal character. \D Matches any non-decimal character.

Quantifiers could be added to specify number of times a character could appear. Description * Zero or more matches. + One or more matches. ? Zero or one matches. {N} N matches. {N,} N or more matches. {N,M} Between N and M matches.

Custom validator The CustomValidator control allows writing application specific custom validation routines for both the client side and the server side validation. The client side validation routine should be written in a scripting language, such as JavaScript or VBScript, which the browser can understand. The server side validation routine must be called from the control's ServerValidate event handler. The server side validation routine should be written in any .Net language, like C# or VB.Net.

Validation Summary The ValidationSummary control does not perform any validation but shows a summary of all errors in the page. The summary displays the values of the ErrorMessage property of all validation controls that failed validation. The following two mutually inclusive properties list out the error message: ShowSummary : shows the error messages in specified format. ShowMessageBox : shows the error messages in a separate window.

View state State management means to preserve state of a control, web page, object/data, and user in the application explicitly because all ASP.NET web applications are stateless, i.e., by default, for each page posted to the server, the state of controls is lost.

View state is the page-level state management technique used in the ASP.NET page framework to retain the value of controls and page between round trips. Data objects such as hash tables, strings, array objects, array list objects, Boolean values and custom-type converters can be stored in view state. View state is ideally used when the data to be preserved is relatively small and the data need not be secured

By default, the view state is switched on and regardless of whether used during a postback, it serializes the information in every control found on the page. To disable the view state for a single control, the EnableViewState property needs to be set as false. The attribute EnableViewStateMac is provided to detect any corruption attempt or technique on the view state.

Advantage: Disadvantages: The mean features of view state are to store the values of control properties and pages found in the concerned page, without the help of a session, preserve the value of the control after the postback operation and to create a custom view state provider for storing view state information in a database. Disadvantages: For large amounts of data, the performance is not optimal, as large values could potentially cause view state to be slow View state can only store values for same page only.

WEB CONTROLS Webcontrol class: Serves as the base class that defines the methods, properties and events common to all controls in the System.Web.UI.WebControls namespace. Some of the properties are mentioned below :- PROPERTY DESCRIPTION BackColor Gets or sets the background color of the Web server control. BorderColor Gets or sets the border color of the Web control. ForeColor Gets or sets the foreground color (typically the color of the text) of the Web server control. Enabled Gets or sets a value indicating whether the Web server control is enabled.

PROPERTY DESCRIPTION ID Gets or sets the programmatic identifier assigned to the server control. ViewState Gets a dictionary of state information that allows you to save and restore the view state of a server control across multiple requests for the same page. Tooltip Gets or sets the text displayed when the mouse pointer hovers over the Web server control.

INPUT CONTROL Input controls let the user enter text data into the application. ASP.NET supports only one input web control: the TextBox. The TextBox behaves like a single-line or multiline edit control, depending on the value of its TextMode property. 

DISPLAY CONTROLS Display controls simply render text or images to the browser. Control Purpose Image Displays the image specified in the control's ImageUrl property. Label Displays the text specified in the control's Text property. Panel Groups a set of controls (like a Frame control in Windows). Table Displays a table of information. This control has two collections: TableRows, which contains the rows, and TableCells, which contains the columns in a row.

ACTION CONTROLS Action controls allow users to perform some action on that page, such as navigating to a different URL, submitting a form, resetting a form's values, or executing a client script.  Control Purpose Button Displays a command button that posts a form to the server when clicked. ImageButton Displays an image that posts a form to the server when clicked. LinkButton Displays a hyperlink text that posts a form to the server when clicked. Hyperlink Displays a hyperlink text that navigates from one page to another when clicked.

SELECTION CONTROLS Selection controls allow the user to select one or more values from a list. They include both the CheckBox and RadioButton controls, which are designed to work in a group.  Control Purpose CheckBox Selects or unselects an option. You can toggle the selection. RadioButton Selects only one option out of a group. You can unselect an option only by selecting another RadioButton control in the group. ListBox Allows the user to select one or more options from a list represented by ListItem controls. This control always occupies a fixed space in the form.

Control Purpose DropDownList Allows the user to select only one option out of a list represented by ListItem controls. This control is used where the space in the form is limited. RadioButtonList Presents a list of radio buttons represented by ListItem controls and allows selection of only one option. CheckBoxList Presents a list of checkboxes represented by ListItem controls and allows you to select zero or more of the options.

THANK YOU