1. Explain about ASP.NET Page Life Cycle?
Ans:When an ASP.NET page runs, the page goes through a life cycle in which it performs a series of processing steps. These include initialization, instantiating controls, restoring and maintaining state, running event handler code, and rendering.
2. What is Ajax
3. We have to do 2 things Before using ajax What are they
4. What is interface?
Ans: Inheritance enables you to create new classes that reuse, extend, and modify the behavior that is defined in other classes. The class whose members are inherited is called the base class, and the class that inherits those members is called the derived class.
5. What is oops
6. What is encapsulation
7. What is Stored Procedure
8. What is command for Knowing List of tables in sql server
Ans: sp_tables(which display all tables and their associated constraints information)
select * from sys.Tables(which display in more detail with how many colomuns in the table , when it was created..etc)
9. What is command for opening stored procedure query
10.Tell me about ur projects
11.What data controles used for data display
12.What is diff b/w GridView and FormView
13.The fallowing program will execute?
interface intf1
{
private void meth();
}
14.What is inheritance?
15.What is Polymorphism?
Ans.Poly means many and morph means form. Thus, polymorphism refers to being able to use many forms of a type without regard to the details.
Types of polymorphism
1.Compile-time polymorphism(Static polymorphism/Overloading/Early Binding)
Method Overloading is using same method name with different parameters
Ex:
public class AddingNumbers
{
public int Add(int a, int b)
{
return a+b;
}
public int Add(int a, int b, int c)
{
return a+b+c;
}
}
2.Run-time polymorphism*Dynamic polymorphism/Overriding/Late Binding)
Runtime time polymorphism is done using inheritance and virtual functions. When overriding a method, you change the behavior of the method for the derived class. Overloading a method simply involves having another method with the same prototype.
EX:
Class Test
{
Public virtual void show()
{
Console.WriteLine(“From base class show method”);
}
}
Public Class DynamicPolyDemo : Test
{
Public override void show()
{
Console.WriteLine(“From Derived Class show method”);
}
Public static void main(String args[])
{
DynamicPolyDemo dpd=new DynamicPolyDemo();
Dpd.show();
}
}
Friday, May 28, 2010
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment