A code-behind file contains the server-side code, which means that the
code contained in a code-behind file is executed at the server.
Well organized easy to understand SQL. Including ASP.NET , SQL Server. Related: HTML, CSS, JavaScript, ASP, XML...
Friday, 6 June 2014
What is the appSettings Section in the web.config file?
The web.config file sets the configuration for a Web project. The appSettings block in configuration file sets the user-defined values for the whole application.
For example, in the following code snippet, the specified ConnectionString section is used throughout the project for database connection:
<configuration>
<appSettings>
<add key="ConnectionString" value="server=indiabixserver; pwd=dbpassword; database=indiabix" />
</appSettings>
...
For example, in the following code snippet, the specified ConnectionString section is used throughout the project for database connection:
<configuration>
<appSettings>
<add key="ConnectionString" value="server=indiabixserver; pwd=dbpassword; database=indiabix" />
</appSettings>
...
How can you dynamically add user controls to a page?
User controls can be dynamically loaded by adding a Web User Control
page in the application and adding the control on this page.
Why do we need nested master pages in a Web site?
When we have several hierarchical levels in a Web site, then we use nested master pages in the Web site.
Where should the data validations be performed-at the client side or at the server side and why?
Data validations should be done primarily at the client side and the
server-side validation should be avoided because it makes server task
overloaded. If the client-side validation is not available, you can use
server-side validation. When a user sends a request to the server, the
validation controls are invoked to check the user input one by one.
What are the major built-in objects in ASP.NET?
The major built-in objects in ASP.NET are as follows:
- Application
- Request
- Response
- Server
- Session
- Context
- Trace
What is a round trip?
The trip of a Web page from the client to the server and then back to the client is known as a round trip.
Explain the cookie less session and its working.
ASP.NET manages the session state in the same process that processes the
request and does not create a cookie. It is known as a cookie less
session. If cookies are not available, a session is tracked by adding a
session identifier to the URL. The cookie less session is enabled using
the following code snippet: <sessionState cookieless="true" />
What is the difference between adding items into cache through the Add() method and through the Insert() method?
Both methods work in a similar way except that the Cache.Add() function returns an object that represents the item you added in the cache. The Cache.Insert() function can replace an existing item in the cache, which is not possible using the Cache.Add() method.
How can you ensure that no one has tampered with ViewState in a Web page?
To ensure that no one has tampered with ViewState in a Web page, set the EnableViewStateMac property to True.
Subscribe to:
Posts (Atom)