sudhir sheoran


{ City } pune
< Country > india
* Profession * .net developer
User No # 92426
Total Questions Posted # 0
Total Answers Posted # 24

Total Answers Posted for My Questions # 0
Total Views for My Questions # 0

Users Marked my Answers as Correct # 69
Users Marked my Answers as Wrong # 10
Questions / { sudhir sheoran }
Questions Answers Category Views Company eMail




Answers / { sudhir sheoran }

Question { Syntax Softtech, 19661 }

What ASP.NET object encapsulates the state of the client and
the browser?
a) The Session object
b) The Application object
c) The Response object
d) The Request object
e) The Server object


Answer

Session object

Is This Answer Correct ?    7 Yes 0 No

Question { Siebel, 6728 }

Whats MSIL, and why should my developers need an
appreciation of it if at all?


Answer

MSIL stands for Microsoft Intermediate Language.
Code written in any programming language is converted
to MSIL using corresponding compilers.
E.g: c++ used c++ compiler to convert code into MSIL.

At run time CLR converts this MSIL into
machine instructions(Native Code)

Is This Answer Correct ?    0 Yes 0 No


Question { Siebel Systems, 20318 }

Name two properties common in every validation control?


Answer

Control to validiate and error

Is This Answer Correct ?    0 Yes 0 No

Question { 5901 }

What?s the difference between the System.Array.CopyTo() and
System.Array.Clone()?


Answer

First of all both perform a shallow copy.
Difference is that:-

copy to() needs another array and index from which it starts copy elements of source array to destination array. E.g if destination array B[] has already 3 elements so we can pass 4 as index and B as destination array. This will make it more clear -

class CopyTO
{
public static void Main()
{
int[] A = new int[3];

int [] B = new int[7];
A[0] = 1;
A[1] = 2;
A[2] = 3;

B[0] = 4;
B[1] = 5;

A.CopyTo(B, 4);
for (int i = 0; i < B.Length; i++)
{
Console.WriteLine(B[i]);
}
}
}

The output will be 4,5,0,0,1,2,3 // It copied elements of A
from Index 4 in B.

Clone to return a array that contains elements of the source array. Its length is same as of source array.

Is This Answer Correct ?    2 Yes 0 No

Question { TCS, 18838 }

You ve defined one page_load event in aspx page and same
page_load event in code behind how will prog run?


Answer

Page load of aspx will be given preference

e.g:


<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default"%>
















And in Code Behind:

public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
Response.Write("Behind");
}
}

SO Page will be shown as output not behind

Is This Answer Correct ?    2 Yes 0 No

Question { 6375 }

Can you store multiple data types in System.Array?


Answer

The answer is yes and no.
Ideally array is collection of single data types
E.g :-
array [] arr = new int [10];
it will store only int because datatype is defined
as int in this case.

In case of some particular requirements array can be used
to store diff data types. But in this case array has
to be declared as object array
E.g:-
class Test
{
public static void Main()
{
object[] arr = new object[10];
arr[0] = 1;
arr[1] = "Hello";
Console.WriteLine(arr[0]);
Console.WriteLine(arr[1]);
Console.ReadLine();
}
}
This is successfully complied.

Is This Answer Correct ?    0 Yes 0 No

Question { 6248 }

Can you override private virtual methods?


Answer

It will give compilation error because virtual functions
can't be private.

Is This Answer Correct ?    0 Yes 0 No

Question { 33216 }

What base class do all Web Forms inherit from?


Answer

System.Windows.Forms

Is This Answer Correct ?    3 Yes 5 No

Question { ADP, 9169 }

Descrie about response.buffer and repsonse.flush ?


Answer

Respose.Buffer method is used to hold the output
at server side until response.flush/ respose.end
is called.

Server doesn't send response to the browser until
all scripts are executed at server side. It uses
reponser.buffer for that.

E.g:
<%response.Buffer=true%>


I write some text, but I will control when
the text will be sent to the browser.


The text is not sent yet. I hold it back!


OK, let it go!


<%response.Flush%>


Is This Answer Correct ?    0 Yes 0 No

Question { Satyam, 32958 }

If cookies is disabled in client browser will session work ?


Answer

Yes it will still work ... Now the session key
(generated when client visited the server
first time)will be sent as query sting through
URL.

Is This Answer Correct ?    10 Yes 2 No

Question { Digital GlobalSoft, 5160 }

What are the collection classes ?


Answer

.Net framework provide specialized class for data storage
and retrieval called collection classes.
They provide support for list,array,stack,queue,hash table.
Mostly they are derived from ICollection,IEnumerable, Ilist,
IDictionary interfaces.
They are defined under system.collections

Is This Answer Correct ?    1 Yes 0 No

Question { MMTS, 8061 }

Life cycle of ASP.NET page when a request is made ?


Answer

1. instantiation: Page class/Page control tree is formed.

2. Initialization:Controls statically declared in aspx
file will be initialized to their default values.
No view state information at this level.

3. Load View State: It contains the state of controls
of a page,when the last time the page was
processed on the server.

4. PostBack Data Porcessing: It loads the poasted
data values.

5. Page load:If the request is postback, the controls are
loaded with the information recovered from view state.

6. Pastback change Notification: If some submit event takes
place then the pageframe work calls raise postback
events.

7. Post back event handling

8. View state saving: All the values in the controls
will be saved to their view states.

9. Render: This method takes HTML Writer object and
use it to accumulate all HTML text to be generated
for a control.
The page calls render method for each control providing
a text writer that writes output to the output stream
object of page response property.

10. Unload: Response is sent back to the client.

Is This Answer Correct ?    2 Yes 0 No

Question { Microsoft, 9095 }

How do you do validations. Whether client-side or
server-side validations are better.?


Answer

Validation can be done at server side as well as
client side.

Client side validations :-
1) are of great use with the enhancement of
java scripts.
2) Performance booster as validation is done at client side.
3) security issues are there in client side validation.
4) So should be used for simple operations like
user input validations e.g valid name,valid date range,
valid phone number,email etc,where security is of not
that much concern.

Server Side validation(SSV):
1) Some validations can be done at server side only
e.g whether a email exists in database or not.
2) Decreases performance because of more trips to server
3) When security is a concern SSV should be used.

Is This Answer Correct ?    0 Yes 0 No

Question { Microsoft, 6288 }

What is an application domain?


Answer

Application domain is both a container and a boundary which contains code and data.
Like OS have processes as the smallest unit of separation, similarly .NET have app domains.

A process can have multiple app domains but a app domain will be associated with only a single process.

App Domain is relatively cheap to create (compared to a process), and has relatively less overhead to maintain than a process.For these reasons, an AppDomain is a great solution for the ISP who is hosting hundreds of applications. Each application can exist inside an isolated AppDomain, and many of these AppDomains can exist inside of a single process – a cost savings.

They separation concern of applications is resolved by assigning different virtual space to different application.
So even if one application crashes it doesn't effect the other applications.

No two application can directly interact with other application even though in same process. They have to use .net Remoting kind of things to do that.

Is This Answer Correct ?    0 Yes 0 No

Question { Microsoft, 7270 }

Singleton Design pattern?How do you achieve it?


Answer

Singleton design pattern can be achieved by following implementation:

1) Make class public

2) Static method to generate the instance of class(calling this method we can get the instance of a class if already a instance is generated we will get the same instance)

3) Private Constructor (so that no other class can generate the instance of singleton class)

Example::

class Class1
{
private static Class1 classInstance;
private IList list = new List();
private Class1()
{
if (list == null)
{
list = new List();
}

}

public static void GetInstance()
{
if (classInstance == null)
{
classInstance = new Class1();
}

}
}

Is This Answer Correct ?    1 Yes 0 No

 [1]   2    Next