Wednesday, April 1, 2020

Top 10 Interview Questions & Answers of ASP.Net C#

What is ASP.NET?


ASP.NET was developed in that response to the problems that developers have with classic ASP. since it is in such widely used, Microsoft ensures that SP script executes without modification on a machine with the Dot Net Framework( The ASP engine, ASP.DLL, Is not modified when installing the Dot Net Framework). Thus, IIS can house both ASP and ASP.NET scripts on the same machine.

Advantages of ASP.NET:

Separation of God from HTML: To make a clean sweep, with ASP.NET you have the ability to completely separate layout and business logic. This makes it much easier for teams of programmers and designers to collaborate efficiently.
Support for compiled languages: developer can use VB.NET and access features such a strong typing and object-oriented programming. Using compiled languages also means that ASP.NET pages do not suffer the performance penalties associated with interpreted code. ASP.NET Pages are precompiled to bytecode and Just In Time (JIT) compiled when first requested. The subsequent request is directed to the fully compiled code which is cached under the source changes.
Use services provided by the .Net Framework: The .NET Framework provides a class library that can be used by your application. Some up the classes help you with input/ output, assist operating system services, data access or even debugging.
Graphical Development Environment: Visual Studio .NET provides a very rich development environment for web developers. You can drag and drop controls and their properties the way you do in Visual Basic 6 and you have full IntelliSense support, not only for your code but also for HTML and XML.
State management: To refer to the problems mentioned before, ASP.NET provides a solution for session and application state management. The state information can, for example, be kept in memory of stored in the database. It can be shared across web forms, and state information can be recovered even if the server fails or the connection breaks down.

ASP.NET overview

Here are some points that give a quick overview of ASP.NET:
ASP.NET provides services to allow the creation, deploy, and execute application and Web Services.
Like ASP, ASP.NET is a server-side technology.
Web applications are built using web forms. ASP.NET comes with built-in web form controls, which are responsible for generating the user interface. The mirror typical HTML widgets like text boxes or buttons. If these controls do not fit your needs, you are free to create your own user controls.
Web forms are designed to make building web-based applications as easy as building Visual Basic applications.

2. What are the different validators in ASP.NET?


ASP.NET validation controls define an important role in validating the user input data. Whenever you will give the input, it must always be validated before sending it across to various layers of an application.If we get the user input with validation, then chances are that we are sending the wrong data. So, meditation is a good idea to do whenever we are taking input from the user.

There are the following two types of validation in ASP.NET:
Client-Side Validation
Server-Side Validation
Client-Side Validation: When validation is done on the client Browser, then it is known as Client-Side Validation. We use JavaScript to do the Client-Side Validation.

Server-Side Validation: When Validation occurs on the server, then it is known as Server-Side Validation. It is a secure form of validation. The main advantage of Server Side Validation is if the user somehow bypasses the client-side validation we can still catch the problem on the server-side.

The following are the validation controls in ASP.NET:
RequiredFieldValidator control
CompareValidator control
RangeValidator control
RegularExpressionValidator control
CustomFieldValidator control
ValidationSummary

3. What is View State?


View State is the method To preserve the value of the page and control between round trips. It is a Page-Level state management technique. View State is turned on by default and normally serializes the data in every control on the page regardless of whether it is actually used during a post-back.

A web application is stateless. It means that a new instance of a page is created every time when we make a request to the server to get the page and after the round trip our page has been lost immediately.

Features of View State:
There are a few features of view state:
Returns the value of the Control after postback without using a session.
Stores the value of Pages and Control properties defined in the page.

Create a custom view state provider that lets you store view state information in a SQL Server Database or in another data store.

Advantages of ViewState:


Easy to implement.
No server resources are required: The view state is contained in a structure within the page load.
And has a security feature: It can be encoded uncompressed or Unicode implementation.

No comments:

Post a Comment

Rewrite whole Web Site System and Sub System with data migration to new system.

Can you please share me your skype id or whats up number for better communications  my skype id is - jitendra.tech  whats up - +919617741414...