ASP.NET Interview Questions and Answers (1544) - Page 20

Where smart naviagation is used?

Smart navigation is used to keep the cursor postions in post backs
How can you show the number of visitors of your app

By havving an application variable and Incrementing it in every session start.
TO Achieve it use the Global.asax file's Application_Start and Session_Start Events.
Diversities between static or dynamic assemblies ?

Assemblies can be static or dynamic.

Static assemblies can include .NET Framework types (interfaces and classes), as well as resources for the assembly (bitmaps, JPEG files, resource files, and so on).

Static assemblies are stored on disk in portable executable (PE) files.

You can also use the .NET Framework to create dynamic assemblies, which are run directly from memory and are not saved to disk before execution.You can save dynamic assemblies to disk after they have executed.
Diff b/w Const and readonly?

A const can not be static, while readonly can be static.

A const need to be declared and initialized at declaration only, while a readonly can be initialized at declaration or by the code in the constructor.

A const’s value is evaluated at design time, while a readonly’s value is evaluated at runtime.
Diff b/w dataset.clone and dataset.copy

dataset.clone copies just the structure of dataset (including all the datatables, schemas, relations and constraints.); however it doesn’t copy the data. On the other hand dataset.copy, copies both the dataset structure and the data.
Namespace and Assembly?

Namespace is a logical design-time naming convenience, whereas an assembly establishes the name scope for types at run time.
How do we do paging in gridview?

Make Allowpaging=true also specify the PageIndex as some value
Whether Cookies is used for session?

If the attribute Cookiless has the value false in web.config means the session uses cookies.
How the SQL Server Session state entry is in the Web Config ??

<sessionState
mode="InProc"
stateConnectionString="tcpip=127.0.0.1:42424"
sqlConnectionString="data source=127.0.0.1;Trusted_Connection=yes"
cookieless="false"
timeout="20"
/>
How will you prevent your Image not to come from caching (Issue generally when you have editted with new one).

Add a querystring with you imageurl or src which is a random number or simply datetime, url will be different everytime, so will not pick from cache !!
The RangeValidator control supports the following datatype

NOTE: This is objective type question, Please click question title for correct answer.
The method that transfers ASP.NET execution to another page, but returns to the original page when it is done is

NOTE: This is objective type question, Please click question title for correct answer.
The keyword ‘int’ maps to one of the following .NET types

NOTE: This is objective type question, Please click question title for correct answer.
Bitwise OR operator in C# is

NOTE: This is objective type question, Please click question title for correct answer.
What namespaces are necessary to create a localized application

NOTE: This is objective type question, Please click question title for correct answer.
What is Tracing in ASP.NET ?

Tracing allows us to view how the code was executed in detail.
How do we enable tracing ?

<%@ Page Trace="true" %>
Found this useful, bookmark this page to the blog or social networking websites. Page copy protected against web site content infringement by Copyscape

 Interview Questions and Answers Categories