answersLogoWhite

0

ASP.NET

ASP.NET was first released in 2002, it is a web application framework. It was created by Microsoft. It is the successor to Active Server Pages (ASP).

187 Questions

Please list all page events in ASP.NET?

Following are the Page life cycyle events of an ASP.NET application: -

- Page request.
- Start.
- Page initialization.
- Load .
- Validation.
- Postback event handling.
- Rendering.
- Unload.

See related links for details about each stage.

How do you make scope and limitations on your investigatory project?

It shows the limitations when researching. example: You are having a difficult time of finding a sample. It is somewhat like you are given a little time and you need more time to finish the work properly. Of course, limitations is not only about time, but other things too.

How many in built objects are there in ASPNet?

there are 6 objects.

1. server

2. session

3. application

4. ObjectContext

5. Response

6. Request

How can you check value from one text box to another text box in asp?

Example:

If (my.textbox1.text = my.textbox2.text) Then ...

What is inproc in detail?

InProc Session StateInProc state is considerably faster than either the state server or SQL Server session storage techniques. SQL Server and state server attribute their slowness to serialization/deserialization that happens while reading in/storing out the Session data from the SQL/State server.

. However storing the session state InProc has its own share of limitations. Some of these are

- With each app domain restart Session state is lost

- Process restart will result in loss of Session state data

- If considerable amount of data are stored in Session state, memory consumption for the process may increase to the point of experiencing issues due to high memory. Therefore, the amount of data being stored in Session state and the time frame during which these data need to be stored should be limited as much as possible.

- In case one wants to implement InProc Session state in a web farm scenario ensure we have sticky sessions enabled for the web farm as it involves storing of the session data among processes hosted on multiple servers.

What is the AdRotator Control?

The AdRotator is an ASP.NET control that is used to provide advertisements to Web pages. The AdRotatorcontrol associates with one or many advertisements, which randomly displays one by one at a time when the Web page is refreshed. The AdRotator control advertisements are associated with links; therefore, when you click on an advertisement, it redirects you to other pages.

The AdRotator control is associated with a data source, which is normally an xml file or a database table. A data source contains all the information, such as advertisement graphics reference, link, and alternate text. Therefore, when you use the AdRotator control, you should first create a data source and then associate it with the AdRotator control.

How do you write addition of two number in asp.net using windows application?

we r using 3 textboxes and ond one result one then we can write this code like

int firstNumber, secondNumber, result;

firstNumber = Convert.ToInt32(txtFirstNumber.Text.Trim());

secondNumber = Convert.ToInt32(txtSecondNumber.Text.Trim());

result = firstNumber + secondNumber;

txtResult.Text = Convert.ToString(result);

What is the full form of ZIP?

ZIP - zicxac inline pin

that format the decreases the size 1/3 of actual size.(rel:computers)

Can a base class access members of a derived class?

Base class can access members functions of derived class if they were declared as 'virtual' in base class and have same prototype. For this type of access, a pointer to base class is required.

class Parent

{

//data members and constructor here

virtual void Func1()

{

cout<<"hello from Parent\n";

}

};

class Child : public Parent

{

//data members and constructor here

void Func1()

{

cout<<"Hello from Child\n";

}

},

int main()

{

Parent *pParent;

pParent = new Parent();

pParent->Func1();

pParent = new Child();

pParent->Func1();

..

..

..

}

OutPut:

Hello from Parent

Hello from Child

The pointer to base class must be initialized to some instance of the derived class, before accessing its member function.

The above is specific to C++. In Java, a base (parent) class can access any methods (but not Class variables) of a subclass ONLY if that subclass overrides the method declared in the parent class.

Thus:

public Parent {

// class variables

private int i;

// class methods

public int myMethod () {

return i;

}

}

public Child {

// class variables

private float k;

// class method

// overrides Parent

public int myMethod () {

return (int) k;

}

// overload Parent

public int myMethod (float j) {

return (int) (j * k);

}

}

Thus, for:

Parent p = new Parent();

Child c = new Child();

Parent n = (Parent) c;

// assume we assign i = 10 in 'p', and k = 5.0 in 'c'

These work fine:

p.myMethod() returns 10

c.myMethod() returns 5

n.myMethod() returns 5

c.myMethod(4.0) returns 20

These don't, and throw a methodNotFound error:

p.myMethod(4.0)

n.myMethod(4.0)

The error is thrown because the Parent definition does not include a method with a signature that takes a floating point value as an argument. This happens even in the case of 'n', which, while actually an object of type Child, is being treated as an object of type Parent in this context, so only the Parent signatures are valid.

Note the above only applies to instantiated objects, so the Class definition of the Parent can make no references of any kind to that of a subclass's definition. In the above example, class Parent could never refer to variable k of subclass Child in any way, nor could it refer to the overridden method.

What is the advantage of using layered architecture in asp.net application?

• When used appropriately, a layered design can lessen the overall impact of changes to the application.

•Allows you to modify a component without disturbing the next one

•Design scalable and maintainable web applications rapidly

•Increase security level of an application

What is the Difference between multiple inheritance and multilevel inheritance in asp.net?

Multiple inheritance, as the name 'multiple' suggests, is one where more than one(multiple) super class is inherited by one sub-class. It can be represented as:

A B C

\ | /

D


On the other hand, in case of multilevel inheritance; the superclass is inherited by a sub-class which is in turn inherited by another class leading to the different level. It can be represented as:


A

|

B

|

C



However in asp, multiple inheritance is not supported.

What is relationship between process and thread?

Process --1------------m-- Threads

1 process to many threads

Bring up your Task Manager (if you are using a windows), Performance tap, you can see the number of process and the number of threads, usually the number of threads is a lot higher than the number of processes.

Write a program to find the sum of even numbers from 2 to50?

In Java:

sum = 0;
for (i = 2; i <= 50; i += 2)
sum += i;

Similar (perhaps identical?) in C.