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
The following controls, which are based on the HTML INPUT element, are available on the HTML tab of the Toolbox:
Input (Button) control: INPUT type="button" element
Input (Checkbox) control: INPUT type="checkbox" element
Input (File) control: INPUT type="file" element
Input (Hidden) control: INPUT type="hidden" element
Input (Password) control: INPUT type="password" element
Input (Radio) control: INPUT type="radio" element
Input (Reset) control: INPUT type="reset" element
Input (Submit) control: INPUT type="submit" element
Input (Text) control: INPUT type="text" element
By default, HTML elements on a Web Forms page are not available to the server; they are treated as markup that is passed through to the browser. However, if you add an id attribute and the attribute runat="server", ASP.NET recognizes the element as a control on the page and you can program it with server-based code.
Yes, 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.
. NET framework is a software development framework from Microsoft. It provides a controlled programming environment where software can be developed, installed and executed on Windows-based operating systems.
NET Framework (pronounced dot net) is a product of Microsoft. It is a programming framework used by Software applications in order to run. It has two major parts: the Common Language Runtime (CLR) and the . Net Framework Class Library. The CLR is an execution engine used to handle running programs.
.NET Framework is a software framework developed by Microsoft that runs primarily on Microsoft Windows. It includes a large class library called Framework Class Library and provides language interoperability across several programming languages.
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.
There are two types of state management techniques: client side and server side.
1) Client side
2) Server side
State Management means maintaining the state of the object. The object here refers to a web page/control.
There are two types of State management, Client Side, and Server side.
Client-Side – Storing the information in the Page or Client’s System. They are reusable, simple objects.
Server Side – Storing the information on the Server. It is easier to maintain the information on the Server rather than depending on the client for preserving the state.
There are 4 main components of .Net Framework.
1)CLR(Common Language Runtime)
CLR is a virtual machine component of Microsoft's .NET framework, manages the execution of .NET programs.
2)CTS(Common type system)
In Microsoft's .NET Framework, the CTS is a standard that specifies how type definitions and specific values of types are represented in computer memory.
3)BCL(Base Class Library)
Base class library is collection of various classes from .net frame work, from which all base classes like System.object, System.collection,.
4)CLS(Common Language Specification)
It is a part of the specifications of the .NET Framework. CLS defines a subset of Common Type System (CTS) . CTS and CLS ensures language interoperability.
ASP.NET is a developer platform made up of tools, programming languages, and libraries for building many different types of applications.
The base platform provides components that apply to all different types of apps. Additional frameworks, such as ASP.NET, extend .NET with components for building specific types of apps.
Managed execution process is a process where CLR executes the managed code. The steps involved in this process are:
1. Compiler needs to be chosen.
2. Convert the source code to MSIL now known as CIL.
3. Convert MSIL to Native code using JIT.
4. Executing code and various services.
Managed Code is converted to IL, Intermediate Language also termed as CIL of MSIL. Programmer has no low level access using Managed Code.
Unmanaged Code is converted to native language code. Programmer can write low level access code using unmanaged code.
Garbage collector manages the allocation and release of memory for your application. Each time you create a new object, the common language runtime allocates memory for the object from the managed heap. As long as address space is available in the managed heap, the runtime continues to allocate space for new objects. However, memory is not infinite. Eventually the garbage collector must perform a collection in order to free some memory. The garbage collector's optimizing engine determines the best time to perform a collection, based upon the allocations being made. When the garbage collector performs a collection, it checks for objects in the managed heap that are no longer being used by the application and performs the necessary operations to reclaim their memory.
Assembly is unit of deployment like EXE or a DLL. It is completely self-describing and is is a reusable, versionable, self-describing deployment unit for types and resources it is the primary building block of a .NET application. Assemblies provide the infrastructure to allow the runtime to fully understand the contents of an application and to enforce the versioning and dependency rules defined by the application.
In .NET, three types of Assemblies are available:
1. Private Assemblies : Private Assemblies are designed to be used by one application and must reside in that application's directory or subdirectory.
2. Shared Assemblies: Microsoft offers the shared assembly for those components that must be distributed. It centered around two principles. Firstly, called side-by-side execution, allows the CLR to house multiple versions of the same component on a single machine. Secondly, termed binding, ensures that clients obtain the version of the component they expect.
3. Satellite Assembly: A satellite Assembly is defined as an assembly with resources only, no executable code.
An Assembly is a collection of logical units. Logical units refer to the types and resources which are required to build an application and deploy them using the .Net framework. The CLR uses this information for type implementations. Basically, Assembly is a collection of Exe and DLLs. It is portable and executable.
A .NET assembly can consist of following elements:
a) Assembly Manifest - The Metadata that describes the assembly and its contents
b) Type Metadata - Defines all types, their properties and methods.
c) MSIL - Microsoft intermediate language
d) A set of Resources - All other resources like icons, images etc.
Only the assembly manifest is required, but either types or resources are needed to give the assembly in any meaningful functionality.
The different parts of an Assembly includes:
• Manifest – It contains the information about the version of an assembly. It is also called as assembly metadata.
• Type Metadata – Binary information of the program.
• MSIL – Microsoft Intermediate Language code.
• Resources – List of related files.
1)DLL file is a dynamic link library which can be used in exe files and other dll files whereas EXE file is a executable file which runs in a separate process which is managed by OS.
2)DLLs are not directly executable . They are separate files containing functions that can be called by programs and other DLLs to perform computations and functions whereas an EXE is a program that can be executed, for example, Windows program.
DLL: They can be reused for some other application. As long as the coder knows the names and parameters of the functions and procedures in the DLL file .
EXE: Only for specific purpose .
4)A DLL would share the same process and memory space of the calling application while an EXE creates its separate process and memory space.
DLL: You want many applications to use it but you don't want to give them the source code You can't copy-paste the code for the button in every program, so you decide you want to create a DL-Library (DLL).
EXE: When we work with project templates like Windows Forms Applications, Console Applications, WPF Applications and Windows Services they generate an exe assembly when compiled.
Exe and DLLs are Assembly executable modules.
Exe is an executable file. This runs the application for which it is designed. An Exe is generated when we build an application. Hence, the assemblies are loaded directly when we run an Exe. However, an Exe cannot be shared with the other applications.
DLL stands for Dynamic Link Library. It is a library that consists of code that needs to be hidden. The code is encapsulated inside this library. An application can consist of many DLLs. These can be shared with the other applications as well.
Other applications which share this DLL need not worry about the code intricacies as long as it is able to call the function on this DLL.
1. You can use Transactions in Procedure. But, you can’t use Transactions in Function.
2. By using a try-catch block, an exception can be handled in a Procedure. Whereas, you can’t use try-catch block in a Function to handle the exception.
3. You can’t utilize Procedures in a SELECT statement. But Function can be utilized in a SELECT statement.
4. The procedure allows as DML(INSERT/UPDATE/DELETE) as well as a SELECT statement in it. Whereas, Function allows only SELECT statement in it.
5. Stored Procedures cannot be used in the SQL statements anywhere in the WHERE/HAVING/SELECT statement. The function can be used in the SQL statements anywhere in SELECT/WHERE/HAVING syntax.
• A Stored Procedure is always used to perform a specific task.
• It can return zero, one or more value.
• It can have both input and output parameters.
• Exception handling can be done using a try-catch block.
• A function can be called from a Procedure.
Caching is a technique that allows to store/cache page output or application data on the client. The cached information is used to serve subsequent requests that avoid the overhead of recreating the same information.
Caching means storing data temporarily in the memory so that the application can access the data from the cache instead of looking for its original location. This increases the performance of the application and its speed. System.Runtime.Caching namespace is used for Caching information in .Net.
Given below are the 3 different types of Caching:
• Page Caching
• Data Caching
• Fragment Caching
Net provides a security model that prevents unauthorized access to resources. CAS is a part of that security model. CAS is present in the CLR. It enables the users to set permissions at a granular level for the code.
CLR then executes the code depending on the available permissions. CAS can be applied only to the managed code. Unmanaged code runs without CAS. If CAS is used on assemblies, then the assembly is treated as partially trusted. Such assemblies must undergo checks every time when it tries to access a resource.
Code Access Security (CAS), in the Microsoft . NET framework, is Microsoft's solution to prevent untrusted code from performing privileged actions. When the CLR loads an assembly it will obtain evidence for the assembly and use this to identify the code group that the assembly belongs to.