You are on page 1of 28

Question:-What is Managed Heap?

The .NET framework includes a managed heap that all .NET languages use
when allocating reference type objects. Lightweight
objects known as value types are always allocated on the stack, but all
instances of classes and arrays are created from a
pool of memory known as the managed heap.

Question:-Describe session handling in a webfarm ?


State Server is used for handling sessions in a web farm. In a web
farm, make sure you have the same in all your webservers.
Also, make sure your objects are serializable. For session state to
be maintained across different web servers in the web
farm, the Application Path of the website (For example \LM\W3SVC\2) in
the IIS Metabase should be identical in all the web
servers in the web farm

Question:-What is Delegate?
A delegate is a class that can hold a reference to a method. Unlike
other classes, a delegate class has a signature, and it
can hold references only to methods that match its signature. A
delegate is thus equivalent to a type-safe function pointer
or a callback.

Question:-What is singlecall and singleton ?


Differneces between Single Call & Singleton. Single Call objects
service one and only one request coming in. Single
Callobjects are useful in scenarios where the objects are required to
do afinite amount of work. Single Call objects are
usually not required tostore state information, and they cannot hold
state information betweenmethod calls. However, Single
Call objects can be configured in aload-balanced fashion.Singleton
objects are those objects that service multiple clients
and henceshare data by storing state information between client
invocations. Theyare useful in cases in which data needs to
be shared explicitly betweenclients and also in which the overhead of
creating and maintaining objectsis substantial.

Question:-What r the ASP.NET List Control ?


ASP.NET List controls ==> There are 3 . 1. DropDownList, 2. ListBox and
3.HTMLSelect.
1. System.Web.UI.WebControls. DropDownList this control renders a
drop-down list in the page at runtime. Only the selected
item is visible when the user is not interacting with the list, and
the other items become visible when the user clicks
the control to see items that can be selected. Only one item can be
selected in this control. This control must be inserted
into a server side form (runat="server") applied.
2. System.Web.UI.WebControls.ListBoxthis control renders a list of
items within a scrolling box, multiple items can be
selected in this control if required. This control must be inserted
into a server side form (runat="server") applied.
3. System.Web.UI.HTMLControls.HTMLSelectthis control can be used to
render a drop-down list or a scrolling list of items.
This control has less built in functionality when compared with
controls above (It lacks many of the properties that can be
used to influence the display style such as ForeColor and BackColor to
name a couple),but it is still capable of performing
most common uses of a list control. This control can be inserted
anywhere, and does not require a server side form.

Question:-What is event bubbling?


Event Bubbling is nothing but events raised by child controls is
handled by the parent control. Example: Suppose consider
datagrid as parent control in which there are several child
controls.There can be a column of link buttons right.Each link
button has click event.Instead of writing event routine for each link
button write one routine for parent which will handlde
the click event of the child link button events.Parent can know which
child actaully triggered the event.That thru arguments
passed to event routine.

Question:-which dll handles the request of .aspx page ?


When the Internet Information Service process (inetinfo.exe) receives
an HTTP request, it uses the filename extension of
the requested resource to determine which Internet Server
Application Programming Interface (ISAPI) program to run to
process the request. When request is for an ASP.NET page (.aspx
file), IIS passes the request to the ISAPI DLL capable
of handling the request for ASP.NET pages, which is aspnet_isapi.dll.

Question:-What is datacube technology?


A multi-dimensional structure called the data cube. it is a data
abstraction that allows one to view aggregated
data from a number of perspectives.Conceptually,the cube consists of a
core or base cuboid, surrounded by a collection of
sub-cubes/cuboids that represent the aggregation of base cuboid along
one or more dimensions. We refer to the dimension
to be aggregated as the measure attribute, while the remaining
dimensions are known as the feature attributes.

Question:-What is data modeling and data mining ?


Data modeling is the process of designing a data base model. In this
data model data will be stored in two types of
table fact table and dimention table.fact table contains the
transaction data and dimention table contains the master
data.
Data mining is process of finding the hidden trends is called the data
mining.
Question:-Diffrence between Java & Javascript ?
Java and JavaScript are two completely different languages in both
concept and design!

Java
Java (developed by Sun Microsystems) is a powerful and much more
complex programming language - in the same category as C
and C++.

Javascript
JavaScript was designed to add interactivity to HTML pages
JavaScript is a scripting language (a scripting language is a
lightweight programming language)
A JavaScript consists of lines of executable computer code
A JavaScript is usually embedded directly into HTML pages
JavaScript is an interpreted language (means that scripts execute
without preliminary compilation)
Everyone can use JavaScript without purchasing a license

Question:-what is MSIL?
MSIL supports OO programming, so we can have a class which has public
and private methods. The entry point of the program
needs to be specified. In fact it doesn't really matter whether the
method is called Mam or Dad. The only thing that matters
here is that .entrypoint is specified inside method. MSIL programs are
compiled with ilasm compiler. Since we are writing a
managed assembly code, we have to make sure that no variables are
allocated in memory when the program goes out of scope.
Here is a more complicated program that, once again, does not do
anything but has some dataThe sample MSIL program.method
static void main(){ .entrypoint .maxstack 1 ldstr "Hello world!" call
void [mscorlib]System.Console::WriteLine(string) ret}

Question:-What is read only and its example ?


A read only member is like a constant in that it represents an
unchanging value. The difference is that a readonly member
can be initialized at runtime, in a constructor as well being able to
be initialized as they are declared. For example
public class MyClass
{
public readonly double PI = 3.14159;
}
Because a readonly field can be initialized either at the
declaration or in a constructor, readonly fields can have
different values depending on the constructor used. A readonly field
can also be used for runtime constants as in the
following example
public static readonly uint l1 = (uint)DateTime.Now.Ticks;
Question:-How we know exe is developed in .net Compatible languages or
not ?
using System;
using System.Collections.Generic;
using System.Text;
using System.Reflection;
namespace checkingnetproj
{
class Program
{
static void Main(string[] args)
{
string FullPATHofFile;
FullPATHofFile = "<path of the exe or dll>";
try
{
AssemblyName assemblyName =
AssemblyName.GetAssemblyName(FullPATHofFile);
Console.WriteLine("{0} - is a .NET assmbly. ", FullPATHofFile);
}
catch (BadImageFormatException)
{
Console.WriteLine("{0} - Not .NET assmbly. ", FullPATHofFile);
}
Console.ReadLine();
}
}

Question:-What r the Acces Modifier?


Access modifies of C# are :
1) Private
2) Protected
3) Internal
4) Protected Internal
5) Public

Question:-What is Sealed class ?


A class can be made sealed in c# using the sealed keyword. When you do
that, it implies that the class cannot be inhereted.
You can extend this functionality to the individual methods as well. In
case you want a class to be inhereted, excluding one
of its methods, just make that particular method sealed.

Question:-Diffrence bteween Shadowing and Hiding ?


Shadowing :-This is VB.Net Concept by which you can provide a new
implementation for base class member without overriding
the member. You can shadow a base class member in the derived class by
using the keyword "Shadows". The method signature,
access level and return type of the shadowed member can be completely
different than the base class member.

Hiding : - This is a C# Concept by which you can provide a new


implementation for the base class member without overriding
the member. You can hide a base class member in the derived class by
using the keyword "new". The method signature,access
level and return type of the hidden member has to be same as the base
class member.Comparing the three :-
1) The access level , signature and the return type can only be
changed when you are shadowing with VB.NET. Hiding and
overriding demands the these parameters as same.
2) The difference lies when you call derived class object with a base
class variable.In class of overriding although you
assign a derived class object to base class variable it will call
derived class function. In case of shadowing or hiding
the base class function will be called.

Question:-From where are custom exceptions derived from ?


SystemException and ApplicationException are both derrived from
Exception.SystemException is the predefined base class for
exceptions that originate from theSystem namespace.ApplicationException
is the class intended as a base for any application
specificexceptions that it is decided, need to be defined.If you want
to define your own "exceptions" for your own specific
applicationthen it is considered good practice to derrive your own
"exception" class fromApplicationExceptionpublic class
CustomException : ApplicationException .

Question:-Why multiple Inheritance not work in C# ?


When we use the Multiple inherutance we use more than one class. Lets
one condition class A and class B are base classes
and class c is is multiple inherting it.And where class c is
inheriting a function .It may be possible that this function
with same name and same signature can present in both class A and Class
B . That time how the compiler will know that which
function it should take wherether from class A or class B.So Multiple
inheritance show's an error.

Question:-What is SQL injection ?


SQL injection is a security vulnerability that occurs in the database
layer of an application. The
vulnerability is present when user input is either incorrectly
filtered for string literal escape
characters embedded in SQL statements or user input is not strongly
typed and thereby unexpectedly
executed. It is in fact an instance of a more general class of
vulnerabilities that can occur
whenever one programming or scripting language is embedded inside
another.

Question:-What is Web Application ?


Web application consists of document and code pages in various formats.
The simplest kind of document is
a static HTML page, which contains information that will be formatted
and displayed by a Web browser. An
HTML page may also contain hyperlinks to other HTML pages.A
hyperlink(or just link) contains an address,
or a Uniform Resource Locator (URL), specifying where the target
document is located. The resulting
combination of content and links is sometimes called hypertext and
provides easy navigation to a vast
amount of information on the World Wide Web.

Question:-What is Web Application ?


Web application consists of document and code pages in various formats.
The simplest kind of document is
a static HTML page, which contains information that will be formatted
and displayed by a Web browser. An
HTML page may also contain hyperlinks to other HTML pages.A
hyperlink(or just link) contains an address,
or a Uniform Resource Locator (URL), specifying where the target
document is located. The resulting
combination of content and links is sometimes called hypertext and
provides easy navigation to a vast
amount of information on the World Wide Web.

Question:-Diffrence between Showding and overriding ?


1. Purpose :
Shadowing : Protecting against a subsequent base class modification
introducing a member you have already
defined in your derived class
Overriding : Achieving polymorphism by defining a different
implementation of a procedure or property with
the same calling sequence
2.Redefined element :
Shadowing : Any declared element type
Overriding : Only a procedure (Function or Sub) or property
3.Redefining element :
Shadowing : Any declared element type
Overriding : Only a procedure or property with the identical calling
sequence
4.Accessibility :
Shadowing : Any accessibility
Overriding : Cannot expand the accessibility of overridden element (for
example, cannot override Protected
with Public)
5.Readability and writability :
Shadowing : Any combination
Overriding : Cannot change readability or writability of overridden
property
6.Keyword usage :
Shadowing : Shadows recommended in derived class;Shadows assumed
neither Shadows nor Overrides specified
Overriding : Overridable required in base class; Overrides required in
derived class
7.Inheritance of redefining element by classes deriving from your
derived class :
Shadowing : Shadowing element inherited by further derived classes;
shadowed element still hidden
Overriding : Overriding element inherited by further derived classes;
overridden element still overridden

Question:-How to Get DateDiffrence ?


DateTime startTime = DateTime.Now;
DateTime endTime = DateTime.Now.AddSeconds( 75 );
TimeSpan span = endTime.Subtract ( startTime );
Console.WriteLine( "Time Difference (seconds): " + span.Seconds );
Console.WriteLine( "Time Difference (minutes): " + span.Minutes );
Console.WriteLine( "Time Difference (hours): " + span.Hours );
Console.WriteLine( "Time Difference (days): " + span.Days );

Question:-what is Cold Backup ?


Offline or cold backups are performed when the database is completely
shutdown. The
disadvantage of an offline backup is that it cannot be done if the
database needs
to be run 24/7. Additionally, you can only recover the database up
to the point
when the last backup was made unless the database is running in
ARCHIVELOG mode.

Question:-How to Compare two time ?


Dim t1 As String = DateTime.Parse("3:30 PM").ToString("t")
Dim t2 As String = DateTime.Now.ToString("t")
If DateTime.Compare(DateTime.Parse(t1), DateTime.Parse(t2)) < 0 Then
---statement
Else
---statement
End If
Question:-How to create a cookie in C#?
HttpCookie cookie;
String UserID = "dotnetquestion";
cookie = new HttpCookie("ID");
cookie.Values.Add("ID", ID);
Response.Cookies.Add(cookie);

Question:-How to detect the User's culture ?


string sLang ;
sLang = Request.UserLanguages[0];
Response.Write (sLang);

Question:-What is database replication? What are the different types of


replication ?
Answer:-Replication is a process from which we copying/moving data
between databases on the same or
different servers.There are three types of replication which i have
define bellow.
(1)Snapshot replication:This replication means data doennot get changed
or updateIt can be used when
data changes are infrequent its mainly used when we have to view data
or some information.
(2)Transactional replication :-This would happen when change is done to
the data.
(3)Merge replication - It is the process of distributing the data
between publisher and subscriber,
it allows the publisher and subscriber to update the data while
connected or disconnected, and then
merging the updates between the sites when they are connected

Question:-what is Deep Coy and Shallow copy ?


Shallow copy create a new reference to the same object.
Deep copy create a new reference to a new object.
Question:-Difference between DELETE TABLE and TRUNCATE TABLE commands ?
DELETE TABLE is a logged operation, so the deletion of each row gets
logged in the transaction
log, which makes it slow. TRUNCATE TABLE also deletes all the rows
in a table, but it won't
log the deletion of each row, instead it logs the deallocation of the
data pages of the table,
which makes it faster. Of course, TRUNCATE TABLE can be rolled back.

Question:-Define candidate key, alternate key, composite key?


candidate key is one that can have row of a table unique. Generally a
candidate key is
primary key of the table. If the table has more than one candidate key,
one of them will
become the primary key, and the rest are called alternate keys.A key
formed by combining
at least two or more columns is called composite key.

Question:-What is the different between <%# %> and <%= %> ?


The <%# %> is used for databinding where as <%= %> is used to
output the result of an
expression. The expression inside <%# %> will be executed only when you
call the page's or
control's DataBind method. The expression inside <%= %> will be
executed and displayed as
and when it appears in the page.

Question:-what is Early & Late Binding ?


Early binding is to know the type of an object at compile time. The
compiler have all the
needed element at compile time to build the call into the excutable
code.
late binding, the type of an object is known only at runtime. It will
need extra instructions
to find out where is the method to be called before calling it.

Question:-What is exception handling ?


When an exception occurs, the system searches for the nearest catch
clause that can handle the
exception, as determined by the run-time type of the exception.
First, the current method is
searched for a lexically enclosing try statement, and the associated
catch clauses of the try
statement are considered in order. If that fails, the method that
called the current method is
searched for a lexically enclosing try statement that encloses the
point of the call to the
current method.This search continues until a catch clause is found that
can handle the current
exception, by naming an exception class that is of the same class,
or a base class, of the
run-time type of the exception being thrown. A catch clause that
doesn't name an exception
class can handle any exception.Once a matching catch clause is found,
the system prepares to
transfer control to the first statement of the catch clause. Before
execution of the catch
clause begins, the system first executes, in order, any finally
clauses that were associated
with try statements more nested that than the one that caught the
exception.Exceptions that
occur during destructor execution are worth special mention. If an
exception occurs during
destructor execution, and that exception is not caught, then the
execution of that destructor
is terminated and the destructor of the base class (if any) is
called. If there is no base
class or if there is no base class destructor, then the exception is
discarded.

Question:-Query to display Foreign Key relationships and name of the


constraint for each table
in Database ?
Answer:-SELECT K_Table = FK.TABLE_NAME,FK_Column =
CU.COLUMN_NAME,PK_Table = PK.TABLE_NAME,
PK_Column = PT.COLUMN_NAME,Constraint_Name = C.CONSTRAINT_NAME
FROM INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS C
INNER JOIN INFORMATION_SCHEMA.TABLE_CONSTRAINTS FK ON
C.CONSTRAINT_NAME = FK.CONSTRAINT_NAME
INNER JOIN INFORMATION_SCHEMA.TABLE_CONSTRAINTS PK ON
C.UNIQUE_CONSTRAINT_NAME = PK.CONSTRAINT_NAME
INNER JOIN INFORMATION_SCHEMA.KEY_COLUMN_USAGE CU ON
C.CONSTRAINT_NAME = CU.CONSTRAINT_NAME
INNER JOIN (
SELECT i1.TABLE_NAME, i2.COLUMN_NAME
FROM INFORMATION_SCHEMA.TABLE_CONSTRAINTS i1
INNER JOIN INFORMATION_SCHEMA.KEY_COLUMN_USAGE i2 ON
i1.CONSTRAINT_NAME = i2.CONSTRAINT_NAME
WHERE i1.CONSTRAINT_TYPE = 'PRIMARY KEY'
) PT ON PT.TABLE_NAME = PK.TABLE_NAME
ORDER BY
1,2,3,4
WHERE PK.TABLE_NAME='something'WHERE FK.TABLE_NAME='something'

WHERE PK.TABLE_NAME IN ('one_thing', 'another')


WHERE FK.TABLE_NAME IN ('one_thing', 'another')

Question:-What is an extended stored procedure ?


Extended stored procedure is a function within a DLL (written in a
language like C, C++ using
Open Data Services (ODS) API) that can be called from T-SQL, just the
way we call normal stored
procedures using the EXEC statement. See books online to learn how
to create extended stored
procedures and how to add them to SQL Server.

Question:-How to get the hostname or IP address of the server ?


HttpContext.Current.Server.MachineName
HttpContext.Current.Request.ServerVariables["LOCAL_ADDR"]
The first one should return the name of the machine, the second returns
the local ip address.
Note that name of the machine could be different than host, since
your site could be using
host headers.

Question:-What is a parser error ?


Its basically a syntax error in your ASPX page. It happens when your
page is unreadable for
the part of ASP.NET that transforms your code into an executable.

Question:-How To work with TimeSpan Class ?


DateTime date1 = DateTime.Parse("11/24/2003");
DateTime date2 = DateTime.Parse("06/28/2003");
TimeSpan ts = new TimeSpan (date1.Ticks - date2.Ticks);
Response.Write(ts.TotalDays.ToString () + "<br>");
Response.Write(ts.TotalHours.ToString() + ":" +
ts.TotalMinutes.ToString() + ":" + ts.TotalSeconds.ToString() + ":" +
ts.TotalMilliseconds.ToString() );

Question:-How to change the Page Title dynamically ?


<TITLE id="Title1" runat =server ></TITLE>
//Declare
protected System.Web.UI.HtmlControls.HtmlGenericControl Title1 ;
//In Page_Load
Title1.InnerText ="Page 1" ;
Question:-Difference between Triggers and Storedprocedures ?
Triggers are basically used to implement business rules.Triggers is
also similar to stored
procedures.The difference is that it can be activated when data is
added or edited or
deleted from a table in a database.Triggers are special kind of stored
procedures that get
executed automatically when an INSERT,UPDATE or DELETE operation takes
place on a table.

Question:-What is xxx(src As Object, e As EventArgs)?


xxx is an event handler
src is the object that fires the event
e is an event argument object that contains more information about the
event.

Question:-Isolation levels in SQL SERVER?


Isolation level get the condition to which data is isolated for use by
one process and secured against interference from
other processes.
Read Committed -
SQL Server applied a share lock while reading a row into a cursor but
frees the lock immediately after reading the row.
Because a shared lock request is blocked by an exclusive lock, a
cursor is prevented from reading a row that another
task has updated but not yet committed. Read committed is the
default isolation level setting for both SQL Server and
ODBC.
Read Uncommitted -
When no locks while reading a row into a cursor and honors no exclusive
locks. Cursors can be populated with values that
have already been updated but not yet committed. The user is
bypassing all of SQL Server’s locking transaction control
mechanisms.
Repeatable Read or Serializable -
SQL Server requests a shared lock on each row as it is read into the
cursor as in READ COMMITTED, but if the cursor is
opened within a transaction, the shared locks are held until the end of
the transaction instead of being freed after the
row is read. This has the same effect as specifying HOLDLOCK on a
SELECT statement.

Question:-What is Collate in SQL SERVER-2000 ?


The COLLATE clause can be applied only for the char, varchar, text,
nchar, nvarchar, and ntext data types. The physical
storage of character strings in Microsoft® SQL Server™ 2000 is
controlled by collations. A collation specifies the bit
patterns to represent each character and the rules by which characters
are sorted and compared with another character.

Question:-Why we use Unicode In Sql server ?


Unicode data is stored using the nchar, nvarchar,and ntext data types
in SQL Server. Use these data types for columns
that store characters from more than one character set. The SQL Server
Unicode data types are based on the National
Character data types in the SQL-92 standard.

Question:-How to register Assemblies in GAC ?


The assemblies are stored in the global assembly cache, which is a
versioned repository of assemblies made available to
all applications on the machine not like Bin and App_Code. Several
assemblies in the Framework are automatically made
available to ASP.NET applications. You can register additional
assemblies by registration in a Web.config file in your
application.
&lt; configuration &gt;
&lt; compilation &gt;
&lt; assemblies &gt;
&lt; add assembly="System.Data,
Version=1.0.2411.0,Culture=neutral,PublicKeyToken=b77a5c561934e089"/
&gt;
&lt; /assemblies &gt;
&lt; /compilation &gt;
&lt; /configuration &gt;

Question:-How Server control handle events ?


ASP.NET server controls can optionally expose and raise server events,
which can be handled by developers.Developer may
accomplish this by declaratively wiring an event to a control (where
the attribute name of an event wireup indicates the
event name and the attribute value indicates the name of a method to
call).
Private Sub Btn_Click(Sender As Object, E As EventArgs)
Message.Text = "http://www.dotnetquestion.info"
End Sub

Question:-Can we develop web pages directly on an FTP server ?


Yes. Visual Web Developer now has built-in support for editing and
updating remote web projects using the standard File
Transfer Protocol (FTP). You can quickly connect to a remote Web
site using FTP within the New Web Site and Open Web
Site dialog box.

Question:-What is Machine.config File ?


As web.config file is used to configure one asp .net web application,
same way Machine.config file is used
to configure application according to a particular machine. That is,
configuration done in machine.config
file is affected on any application that runs on a particular
machine. Usually, this file is not altered
and only web.config is used which configuring applications.

Question:-What is Store Procedure ?


A stored procedure is a set of structured query language statements
that you assign a name and store it in
to the database in a compiled form so that it can share between no of
programs.
Some advantage of Store Procedure.
they allow faster execution
they can reduce network traffic

Question:-What are Indexes in SQL SERVER?


Microsoft SQL Server index helps in creating the structure of table
that helps in speeds retrieval of the rows in the table.
An index create a keys from one or more columns in the table. These
keys are stored in a structure that allows SQL Server
to find the row or rows created with the key values quickly and
efficiently.If a table doest not containeated indexes,the
data rows are not stored in any specific order.This structure is stored
on heap.
There are two types of SQL Server indexes:

(1)Clustered:-
Clustered indexes helps in sorting and storeing the data rows in
the table take key values as base. Because the data
rows are stored in sorted order on the clustered index key,
clustered indexes more efficient for finding rows. There is
only one clustered index per table. The data rows themselves form the
lowest level of the clustered index. The only time
the data rows in a table are stored in sorted order is when table
contains a clustered index. If a table has no clustered
index, its data rows are stored in a heap.

(2)Nonclustered:-
Nonclustered indexes having structure that is diffrent from the data
rows . The lowest rows of a nonclustered index have the
nonclustered index key values and each key value entry has pointers to
the data rows containing the key value. The data rows
are not stored in order based on the nonclustered key. The pointer
from an index row in a nonclustered index to a data row
is called a row locator. The structure of the row locator depends
on whether the data pages are stored in a heap or are
clustered. In heap,a row locator is a pointer that point to the row.
For a table with a clustered index, the row locator is
the clustered index key.

Question:-What is Code Refactoring?


Ans.Its a feature of Visual Web Express & Visual Studio 2005. Code
Refactoring Code Refactoring enables you to
easily and systematically make changes to your code. Code Refactoring
is supported everywhere that you can write
code including both code-behind and single-file ASP.NET pages. For
example, you can use Code Refactoring to
automatically promote a public field to a full property.

Question:-What is Property ?
A property is a thing that describes the features of an object. A
property is a piece of data contained within
class that has an exposed interface for reading/writing. Looking at
that definition, you might think you could
declare a public variable in a class and call it a property. While this
assumption is somewhat valid, the true
technical term for a public variable in a class is a field. The key
difference between a field and a property
is in the inclusion of an interface.

We make use of Get and Set keywords while working with properties.
We prefix the variables used within this
code block with an underscore. Value is a keyword, that holds the value
which is being retrieved or set.

Private _Color As String


Public Property Color()
Get
Return _Color
End Get
Set(ByVal Value)
_Color = Value
End Set
End Property

Question:- Gave an idea about NameSpace and Assembly ?


Answer:-Namespace is not related to that of an assembly. A single
assembly may contain many types whose
hierarchical names have different namespace roots, and a
logical namespace root may span multiple
assemblies. In the .NET Framework, a namespace is a logical design-
time naming convention, whereas an
assembly establishes the name scope for types at run time.
Namespace:-(1)Namespace is logical grouping unit.
(2)It is a Collection of names wherein each name is Unique.
(3)They form the logical boundary for a Group of classes.
(4)Namespace must be specified in Project-Properties.
Assembly:-(1)Assembly is physical grouping unit.
(2)It is an Output Unit. It is a unit of Deployment & a unit of
versioning. Assemblies contain MSIL code.
(3)Assemblies are Self-Describing.

Question:-What does the term immutable mean?


Ans.It means to create a view of data that is not modifiable and is
temporary of data that is modifiable.Immutable
means you can't change the currrent data,but if you perform some
operation on that data, a new copy is created. The
operation doesn't change the data itself. Like let's say you have a
string object having "hello" value. Now if you
say
temp = temp + "new value"
a new object is created, and values is saved in that. The temp object
is immutable, and can't be changed. An object
qualifies as being called immutable if its value cannot be modified
once it has been created. For example, methods
that appear to modify a String actually return a new String containing
the modification. Developers are modifying
strings all the time in their code. This may appear to the
developer as mutable - but it is not. What actually
happens is your string variable/object has been changed to reference a
new string value containing the results of
your new string value. For this very reason .NET has the
System.Text.StringBuilder class. If you find it necessary
to modify the actual contents of a string-like object heavily, such as
in a for or foreach loop, use the System.Text.StringBuilder class.

Question:-Diffrence between Abstract and Interface?


1.We can't create instances for both
2.Single inheritance in abstract class, multible inheritance in
interface
3.We can have concrete method in abstact class but not in the interface.
4.Any class that needs to use abstract must extent
5.Any class that needs to use interface must implement
5.Interface all the variables are static and final.

Question:-Diffrence between Viewstate and Session?


View State are valid mainly during postbacks and information is stored
in client only. Viewstate are valid for
serializable data only. Moreover Viewstate are not secured as data
is exposed to client. although we can
configure page directive and machine key to make view state
encrypted. Where in case of session this is user
specific data that is stored in server memory . Session state is
valid for any type of objects. We can take
help of session through different web pages also.

Questions:- Define basic functions for master, msdb, tempdb databases


in Sql Server ?
Answer:-(1)master:-It contains system level information for a SQL
Server system and also contains login accounts
and all system configuration settings. master is the
database that records the existence of all other
databases, including the location of the database files.
(2) tempdb - This database holds all temporary tables and
temporary stored procedures. It also fills any
other temporary storage needs such as work tables generated
by SQL Server. tempdb is re-created every
time SQL Server is started so the system starts with a clean
copy of the database.
(3)model - The model database is used as the template for
all databases created on a system. When a
CREATE DATABASE statement is issued, the first part of the
database is created by copying in the contents
of the model database, then the remainder of the new database
is filled with empty pages. Because tempdb
is created every time SQL Server is started, the model database
must always exist on a SQL Server system.
(4)msdb - The msdb database is used by SQL Server Agent for
scheduling alerts and jobs, and recording
operators.

Question:-What is LDAP ?
LDAP is a networking protocol for querying and modifying directory
services running over TCP/IP.To explain LDAP we take a
example of telephone directory, which consists of a series of names
organized alphabetically, with an address and phone
number attached.To start LDAP on client it should be connect with
server at TCP/IP port 389.The client can send multiple
request to the server.The basic operations are:-
Start TLS - protect the connection with Transport Layer Security (TLS),
to have a more secure connection
Bind - authenticate and specify LDAP protocol version
Search - search for and/or retrieve directory entries
Compare - test if a named entry contains a given attribute value
Add a new entry
Delete an entry
Modify an entry
Modify DN - move or rename an entry
Abandon - abort a previous request
Extended Operation - generic operation used to define other operations
Unbind - close the connection (not the inverse of Bind)
Question:-What is RAD ?
Rapid application development (RAD), is a software development process
developed initially by James Martin in the 1980s.
The methodology involves iterative development, the construction of
prototypes, and the use of Computer-aided software
engineering (CASE) tools. Traditionally the rapid application
development approach involves compromises in usability,
features,& /or execution speed.Increased speed of development through
methods including rapid prototyping,virtualization
of system related routines, the use of CASE tools, and other
techniques. Increased end-user utility Larger emphasis on
simplicity and usability of GUI design.Reduced Scalability, and reduced
features when a RAD developed application starts
as prototype and evolves into a finished application Reduced features
occur due to time boxing when features are pushed
to later versions in order to finish a release in a short amount of
time.

Question:-What are publisher,distributor and subscriber in


"Replication" ?
Answer:-Publisher is main source of data and we can say its the owner
of the database.
And its takes decision how to distribute data accross.
Distributor is a bridge between publisher and the
subscriber.Distributor is one who
gathers all the data which is published by publisher and take it
before send it to
subscriber. So it is clear that it is bridge between publisher and
subscriber and its
supports multiple publisher and subscriber concepts.
Subscriber is end source or the final place where data has to be
transmitted.

Question:-What problem occurs when not implement proper locking


strategy ?
Answer:-There are four major problem occurs:-
(1)Dirty Reads
(2)Unrepeatable reads
(3)Phantom reads
(4)Lost updates

Question:-When we create a connection in ADO.NET a metadata is created


what information it contains ?
Answer:- Metadata collections contains information about items whose
schema can be retrieved. These collections are as follows:
Tables : Provides information of tables in database.
Views : Provides information of views in the database.
Columns : Provides information about column in tables.
ViewColumns : Provides information about views created for columns.
Procedures : Provides information about stored procedures in database.
ProcedureParameters : Provides information about stored procedure
parameters.
Indexes : Provides information about indexes in database.
IndexColumns : Provides information about columns of the indexes in
database.
DataTypes : Provides information about datatypes.
Users : Provides information about database users.

Question:-what is a jitter and how many types of jitters are there ?


Answer:-JIT is just in time complier.it categorized into three:-
1 Standard JIT : prefered in webApp-----on diamand
2 Pre JIT : only one time------only use for window App
3 Economic JIT : use in mobile App

Question:-What is the difference between Dataset.clone and Dataset.copy


?
Answer:-The one and the main diffrenet between these two is clone only
copy the structure
but not the data on the other hand copy copies all the data and also
the structure.

Question:- How does .NET and SQL SERVER thread is work ?


Answer :-There are two types of threading pre-emptive and Non-
preemptive but Sql Server support
Non-preemptive and .NET thread model is different. Because Sql have to
handle thread in different
way for SQLCLR this different thread are known as Tasking of Threads
. In this thread there is a
switch between SQLCLR and SQL SERVER threads .SQL SERVER uses
blocking points for transition to
happen between SQLCLR and SQL SERVER threads.

Question:-What is the difference between Dataset.clone and Dataset.copy


?
Answer:-The one and the main diffrenet between these two is clone only
copy the structure
but not the data on the other hand copy copies all the data and also
the structure.

Question:- How does .NET and SQL SERVER thread is work ?


Answer :-There are two types of threading pre-emptive and Non-
preemptive but Sql Server support
Non-preemptive and .NET thread model is different. Because Sql have to
handle thread in different
way for SQLCLR this different thread are known as Tasking of Threads
. In this thread there is a
switch between SQLCLR and SQL SERVER threads .SQL SERVER uses
blocking points for transition to
happen between SQLCLR and SQL SERVER threads.

Question:-What is CUBE and define its functioning ?


Answer:- Its return all the combination total of group by result
Syntax:- select firstcol,secondcol,sun(thirdcol) from
tablename group by firstcol,
secondcol with cube order by firstcol.

Question:-What are the GLOBAL and LOCAL cursor in SQL SERVER 2005 ?
Answer:-When we are creating a cursor by default it is Global. When is
global by default we can
access it from outside also. But on the other side local
cursor are only accesible
inside the objects these objects can be anything just like Stored
Procedure,Trigger and funtion.
we can also declare cusror as local or global its up to us.

Question:-Define what the function RANK() do and how it different from


ROW_NUMBER ?
Answer:- The RANK() function have same as ROW_NUMBER but the diffrence
is on its ouput its display
duplicate values are treated as diffrent with this
syntax:- select firstcol,secondcol,rank() over(order by secondcol) as
rownumber from tablename

Question:-Can you define ROLLUP in SQL SERVER 2005 ?


Answer:-ROLLUP work with the "Group By " clause its main functioning
comes into existance when
we use Group by. We can get sub-total of row by using the
Rollup funtion.When result is
return by Group By class first row display the grand total or we can
say that the main total.
syntax:-select firstcolumn,secondcolumn,sum(thirdcolumn) from tablename
group by firstcolumn,
secondcolumn with rollup order by firstcolumn.

Question:-How to diplay alert on post back from javascript ?


Answer:-
string strScript = "<script language=JavaScript>alert('Saved
Successfully')</script>";
if ((!Page.IsStartupScriptRegistered("clientScript")))
{
Page.RegisterStartupScript("clientScript", strScript);
}

Question:-How to split a string in Javascript ?


Answer:-
var str1="alka,pervej,gitesh";
var temp = new Array();
temp = str1.split(',');
now we get value in this way
temp[0]="alka";
temp[1]="pervej";
temp[2]="gitesh";

Question:-Can You explain the syntax of ISNULL() in SQL SERVER ?


Answer:-Returns a Boolean value that indicates whether an expression
contains no valid data we
can also use this as conditional operator and also as if else loop.
syntax:-
isNull("dotnet","SQL")
if condition is true then its return dotnet
if not then SQL

Question:- How ROW_NUMBER function helps and what is its functioning ?


Answer:-Row_NUMBEr functions add a column that display a number column
to and correspondance column
althogh the column is not unique it takes order by clause also
with it.
Syntax:- select firstcol,secondcol,row_number() over(order by
secondcol) as rownumber from tablename

Question:-How to Add a Assembly in GAC ?


Answer:-There are three ways to add an assembly to the GAC:
(1)Install them with the Windows Installer 2.0
(2)Use the Gacutil.exe tool
(3)Drag and drop the assemblies to the cache with Windows Explorer

- Create a strong name using sn.exe tool


eg: sn -k keyPair.snk
- with in AssemblyInfo.cs add the generated file name
eg: [assembly: AssemblyKeyFile("dotnet.snk")]
- recompile project, then install it to GAC by either
drag & drop it to assembly folder (C:\WINDOWS\assembly OR
C:\WINNT\assembly) (shfusion.dll tool)
or
gacutil -i abc.dll
Question:-What is Class ?
A class is an organized store-house in object-oriented programming that
gives coherent functional abilities to a
group of related code. It is the definition of an object, made up of
software code. Using classes, we may wrap data
and behaviour together (Encapsulation).We may define classes in terms
of classes (Inheritance).We can also override
the behaviour of a class using an alternate behaviour (Polymorphism).

Question:-What are the methods provided by command object ?


Answer:-There are the different method are provided by command objects.
(1)ExecuteNonQuery:-This methods executes the commandtext property
which is passed with the connection
object and this does not return any rows.It will used for UPDATE,INSERT
or DELETE.Its return the integer
value.
(2)ExecuteReader:-Its execute the command text.But its return reader
object that is read only.
(3)ExecuteScalar:-Its execute the command text but this return only
single value only the first value of
first column. And any other returned column return are discarded.This
is fast and efficent for singleton
value .

Question:-In ADO.NET a metadata is created what information it contains


?
Answer:- Metadata collections contains information about items whose
schema can be retrieved. These collections are as follows:
Tables : Provides information of tables in database
Views : Provides information of views in the database
Columns : Provides information about column in tables
ViewColumns : Provides information about views created for columns
Procedures : Provides information about stored procedures in database
ProcedureParameters : Provides information about stored procedure
parameters
Indexes : Provides information about indexes in database
IndexColumns : Provides information about columns of the indexes in
database
DataTypes : Provides information about datatypes
Users : Provides information about database users

Question:-Why it is preferred not to use finalize for cleanup ?


Answer:-There is problem with the finalize regards to object when we
use finalize to destroy the
object it will take two round to remove the objects.To understand it we
will take a simple example
let there are three objects obj1,obj2,obj3 we use finalize for obj2.Now
when garbage collector is
run first time it will only clean obj1,obj3 becuase obj2 is pushes to
the finalization queue. Now
when garbage collector runs second time it will take if any object is
pending for finalization then
it will check the finalization queue if any item it will destroy that
one.

Question:-What are advantage and disadvantage of Hidden fields ?


Answer:-Some of advantage of Hidden field as follows.
-These are quite simple to implement.
-We can work with the Web-Farm because data is cached on client side.
-One other reason is all browser support hidden field.
-Server resoucres not required.
And disadvantage are as follows
-Security reason not secure
-Performance decrease if data is too large.
-These are single valued and cannot handle havvy structure.

Question:-What is Daemon threads what's its purpose ?


Answer:- When a process is executing there are some threads that's run
in background one of this
thread is daemon thread. The simple example of this thread is Garbadge
collector its run when any
of .NET code is running if not running then it is in idle condition.
we can make daemon thread by
Thread.Isbackground=true

Question:-What is the diffrence between Pivot an Unpivot ?


Answer:-These tow are th opertor in Sql Server 2005 these are used to
manupulate a expression from one
table into another table but bothe are opposite of each other Pivot
take rows and put them into the
column but on the other hand Unpivot take column and put them into the
row.Pivots helps in rotating
unique in one column from mutliple columns.

Question:-What do you mean by a cluster ?


Answer:-A cluster is the logical unit of file storage on a hard disk;
it's managed by the computer's operating
system. Any file stored on a hard disk takes up one or more
clusters of storage. A file's clusters can be
scattered among different locations on the hard disk. The clusters
associated with a file are kept track of
in the hard disk's file allocation table (FAT). When you read a file,
the entire file is obtained for you and
you aren't aware of the clusters it is stored in. Since a cluster is a
logical rather than a physical unit,
the size of a cluster can be varied.
Question :-How to create Arraylist,HashTable in asp.net ?
Answer:-Creating Arraylist in VB.NET and sort that
dim mycountries=New ArrayList
mycountries.Add("India")
mycountries.Add("USA")
mycountries.Add("Pakisatn")
mycountries.Add("Italy")
mycountries.TrimToSize()
mycountries.Sort()
Creating Hashtable in VB.NET
dim mycountries=New Hashtable
mycountries.Add("N","Norway")
mycountries.Add("S","Sweden")
mycountries.Add("F","France")
mycountries.Add("I","Italy")

Question:-How many types of local table in sql define with syntax ?


Answer:-There are 2 types of temporary tables, local and global. Local
temporary tables are
created using a single pound (#) sign and are visible to a single
connection and automatically
dropped when that connection ends. Global temporary tables are created
using a double pound (##)
sign and are visible across multiple connections and users and are
automatically dropped when all
SQL sessions stop referencing the global temporary table.

CREATE TABLE #MyTempTable


(
PolicyId INT IDENTITY(1,1) PRIMARY KEY NOT NULL,
LastName VARCHAR(50) NOT NULL
)

Question:-Where are all .NET Collection classes located ?


Answer:-System.Collection.

Question:-Diffrence between temp table and table variable ?


Answer:- (1)Temp Tables are created in the SQL Server TEMPDB database
and therefore require more
IO resources and locking. Table Variables and Derived Tables are
created in memory.
(2)Temp Tables will generally perform better for large amounts of data
that can be worked on using
parallelism whereas Table Variables are best used for small amounts of
data (I use a rule of thumb
of 100 or less rows) where parallelism would not provide a significant
performance improvement.
(3)You cannot use a stored procedure to insert data into a Table
Variable or Derived Table. For
example, the following will work: INSERT INTO #MyTempTable EXEC
dbo.GetPolicies_sp whereas the
following will generate an error: INSERT INTO @MyTableVariable EXEC
dbo.GetPolicies_sp.
(4)Derived Tables can only be created from a SELECT statement but can
be used within an Insert,
Update, or Delete statement.
(5) In order of scope endurance, Temp Tables extend the furthest in
scope, followed by Table
Variables, and finally Derived Tables.

Question:- What do you mean by Late Binding ?


Answer:-In LateBinding compiler not have any knowledge about COM's
methods and properties and it
get at runtime. Actually program learns the addresses of methods and
properties at execution time.
When those methods and properties are invoked. Late bound code
typically refers client objects
through generic data types like 'object' and relies heavily on
runtime to dynamically locate
method addresses. We do late binding in C# through reflection.
Reflection is a way to determine
the type or information about the classes or interfaces.

Question:-What are the valid parameter types we can pass in an Indexer ?


Answer:-IN,OUT,INOUT are the valid parameter types that we can pass in
a Indexer.

Question:-Display time in 12 hour format in javascript ?


Answer:-function validateTimeFormat(timeStr)
{
// Checks if time is in HH:MM:SS AM/PM format.
// The seconds and AM/PM are optional.

var timePat =
/^(\d{1,2})(\s)?:(\s)?(\d{2})((\s)?:(\s)?(\d{2}))?(\s?(AM|am|PM|pm))?$/;

var matchArray = timeStr.match(timePat);


if (matchArray == null)
{
alert("Time is not in a valid format.");
return false;
}
hour = matchArray[1];
minute = matchArray[2];
second = matchArray[4];
ampm = matchArray[6];

if (second=="") { second = null; }


if (ampm=="") { ampm = null }
if (hour < 0 || hour > 23)
{
alert("Hour must be between 0 and 23.");
return false;
}
if (hour <= 12 && ampm == null)
{
if (confirm("Please indicate which time format you are using. OK =
Standard Time, CANCEL = Military Time"))
{
alert("You must specify AM or PM.");
return false;
}
}
if (hour > 12 && ampm != null)
{
alert("You can't specify AM or PM for military time.");
return false;
}
if (minute<0 || minute > 59)
{
alert ("Minute must be between 0 and 59.");
return false;
}
if (second != null && (second < 0 || second > 59))
{
alert ("Second must be between 0 and 59.");
return false;
}
return true;
}

Question:- How we display hyperlinks without an underline ?


Answer:- A:link { text-decoration: none } ----- for normal, unvisited
links, no underline;
A:active { text-decoration: none } --- active is for link appearance
while you're clicking.
A:visited { text-decoration: none } --- visited is for previously
visited links.

Question:- How do you write the multiple class in one tag?


Answer:- Using the following way you can set two classes.
<p class="firstclass secondclass">
it will apply two css class named first and second.

Question:-What is the Relation in CSS and HTML?


Answer:- Html is just for creating Web page and CSS is for modify or
Design, content of the page,
as color, buttons, blur, shadow, highlight, fade atc.

Question:-what is Hot Backup ?


An online backup or hot backup is also referred to as ARCHIVE LOG
backup. An online
backup can only be done when the database is running in ARCHIVELOG
mode and the
database is open. When the database is running in ARCHIVELOG mode,
the archiver
(ARCH) background process will make a copy of the online redo log
file to archive
backup location.

Question:-What is SET operator in SQL SERVER ?


Answer:-SET operators mainly used to combine same type of data from two
or more tables.And another
thing is that columns and their data type should be same as all the
queries have.The column names
from the first query will appear in the result.

UNION - It produce rows of Ist query + rows of 2nd query minus


duplicate rows
UNION ALL - It produce rows from both the queries including duplicate
rows.
MINUS - Rows that are unique for the 1st query will be retrieved
INTERSECT - common rows from both the queries will be retrieved.

Join is used to select columns from two or more tables.

Question:How can we load multiple tables in to Dataset?


Write the select queries required in fill statement.
e.g.
Adp.Fill("Select * from Table1;Select * from Table2;Select * from
Table3",DS)
This statement wil generate Dataset with 3 datatables.

Question:-Explain syntax of NULLIF in SQL SERVER 2000 ?


Answer:-NULLIF ( expression , expression )
syntax return a null value if the two of specified expressions are
equal.NULLIF returns
the first expression if the two expressions are not equal. If the
expressions are equal,
NULLIF returns a null value of the type of the first expression.
NULLIF is equivalent
to a searched CASE function in which the two expressions are equal
and the resulting
expression is NULL.

Question:-How to delete backup history for past day ?


Answer:- Here i have given a syntax to delete backup history of
database.
USE msdb
GO
DECLARE @DaysToKeepHistory DATETIME
SET @DaysToKeepHistory = CONVERT(VARCHAR(10), DATEADD(dd, -30,
GETDATE()), 101)

EXEC sp_delete_backuphistory @DaysToKeepHistory


GO

Question:Type of garbage collector?


There are two types of Garbage Collector
managed garbage collector
see we will declaring variable ,object in our programes once this kind
of variable,object goes out of the
scope ,they are put into the heap and they are checked for the further
existence.once its beeing no longer
used garbage collector wil deallcate mem for that variable and
objects.
Umanaged garbage collector
this was done mannually and u will be happen to open a connection
with database,will be open the file
etc. while this kind of the thing goes out of the scope we have to
explicitly call the garage colector by
calling the closecommand of the datbase once the connection is
closed it puts this memmory ino the heep
and process follws the same

Question:How many records can take clustured index in sql ?


A clustered index is a special type of index that reorders the way the
records in the table are physically
stored . therefore the table can have only one clustered index.

You might also like