Browsed by
Tag: FAQ on ASP.NET

What is caching?

What is caching?

Caching is a technique used to increase performance by keeping frequently accessed data or files in memory. The request for a cached file/data will be accessed from cache instead of actual location of that file. In the context of ASP.NET, caching refers to the process of storing frequently accessed data in memory temporarily. This allows subsequent requests for the same data to be served more quickly, as the data can be retrieved from the cache rather than being recalculated or…

Read More Read More

Explain the working of passport authentication

Explain the working of passport authentication

First of all it checks passport authentication cookie. If the cookie is not available then the application redirects the user to Passport Sign on page. Passport service authenticates the user details on sign on page and if valid then stores the authenticated cookie on client machine and then redirect the user to requested page. In an ASP.NET interview, if you’re asked to explain the working of passport authentication, it’s likely referring to the Passport authentication mechanism provided by Microsoft for…

Read More Read More

What are the components of ADO.NET?

What are the components of ADO.NET?

The components of ADO.Net are Dataset, Data Reader, Data Adaptor, Command, connection. In an ASP.NET interview, when asked about the components of ADO.NET, you can provide the following answer: ADO.NET (ActiveX Data Objects .NET) is a part of the .NET framework used to access and manipulate data from various data sources. The main components of ADO.NET are: Connection: Represents a connection to a data source, such as a database. It provides methods for opening, closing, and managing connections to the…

Read More Read More

What is the difference Between Server.Transfer and Response.Redirect?

What is the difference Between Server.Transfer and Response.Redirect?

Server. Transfer sends information from one web request to another, all on the server side. A response is not sent to the browser. On the other hand, Response.Redirect sends an HTTP 302 message to the browser and causes a redirect in the browser. In ASP.NET, both Server.Transfer and Response.Redirect are used for page redirection, but they operate differently: Server.Transfer: Server.Transfer transfers control from one page to another on the server side. The URL in the browser remains the same. It…

Read More Read More

What is Ajax in ASP.NET?

What is Ajax in ASP.NET?

Ajax stands for Asynchronous JavaScript and XML; in other words Ajax is the combination of various technologies such as a JavaScript, CSS, XHTML, DOM, etc. AJAX allows web pages to be updated asynchronously by exchanging small amounts of data with the server behind the scenes. This means that it is possible to update parts of a web page, without reloading the entire page. We can also define Ajax is a combination of client-side technologies that provides asynchronous communication between the…

Read More Read More

What are master pages?

What are master pages?

Some points about Master Pages, The extension of MasterPage is ‘.master’. MasterPage cannot be directly accessed from the client because it just acts as a template for the other Content Pages. In a MasterPage we can have content either inside ContentPlaceHolder or outside it. Only content inside the ContentPlaceHolder can be customized in the Content Page. We can have multiple masters in one web application. A MasterPage can have another MasterPage as Master to it. The content page content can…

Read More Read More

Which type if caching will be used if we want to cache the portion of a page instead of whole page?

Which type if caching will be used if we want to cache the portion of a page instead of whole page?

Fragment Caching: It caches the portion of the page generated by the request. For that, we can create user controls with the below code: If you want to cache only a portion of a page rather than the entire page in ASP.NET, you would typically use “Partial Page Caching” or “Fragment Caching.” Partial Page Caching allows you to cache specific regions or controls within a page, rather than caching the entire page. This can be useful when certain parts of…

Read More Read More

What are the advantages of Passport authentication?

What are the advantages of Passport authentication?

All the websites can be accessed using single login credentials. So no need to remember login credentials for each web site. Users can maintain his/ her information in a single location. Passport authentication in ASP.NET refers to using external authentication providers like Google, Facebook, Twitter, etc., to authenticate users in your application. The advantages of Passport authentication include: Simplified User Authentication: Passport authentication simplifies the authentication process by allowing users to log in using their existing accounts from other platforms….

Read More Read More

What is the difference between ExecuteScalar and ExecuteNonQuery?

What is the difference between ExecuteScalar and ExecuteNonQuery?

ExecuteScalar returns output value where as ExecuteNonQuery does not return any value but the number of rows affected by the query. ExecuteScalar used for fetching a single value and ExecuteNonQuery used to execute Insert and Update statements. In the context of ASP.NET and database interactions, ExecuteScalar and ExecuteNonQuery are methods provided by ADO.NET for executing SQL commands against a database. Here’s the difference between them: ExecuteScalar: The ExecuteScalar method is used when you expect your SQL query to return a…

Read More Read More

What is fragment caching?

What is fragment caching?

Fragment caching refers to the caching of individual user controls within a Web Form. Each user control can have independent cache durations and implementations of how the caching behavior is to be applied. Fragment caching is useful when you need to cache only a subset of a page. In ASP.NET, fragment caching is a technique used to cache portions of a web page rather than caching the entire page. This allows specific parts of the page, such as user controls…

Read More Read More