Asp Net Interview Questions Tutorialspoint

1 What are the different types of caching?

ASP.NET has 3 kinds of caching :

  • Output Caching,
  • Fragment Caching,
  • Data Caching.
  • How can we apply Themes to an application?

    We can specify the theme in web.config file. Below is the code example to apply theme:

    2 How can a class be prevented from being inherited?

    Ans: To prevent a class from being inherited, the sealed keyword in C# can be used. The NotInheritable keyword can be used in VB.NET to prevent accidental inheritance of the class.

    1 What does ViewState Property use for?

    In the control class, there exist ViewStateMode is introduced in ASP.NET4. This helps to work with the view state of event control, despite it is disabled on the web page.

    1 What is the difference between Stack and Heap?

    Ans: The stack is used for static memory allocation and access to this memory is fast and simple to keep track of. Heap is used for dynamic memory allocation and memory allocation to variables that happen at run time. Accessing the heap memory is complex and slower compared to the stack.

    What are the differences between systems. StringBuilder and system. string?

    Ans: System. a .string is immutable and fixed-length, whereas StringBuilder is mutable and variable length. The size of the .string cannot be changed, but that of the .stringbuilder can be changed.

    2 What are custom server controls of the web pages?

    Controls that are not available in the ASP library can be created and registered, known as custom server controls.

    4 What is Object-Role Modeling (ORM)?

    Ans: Object-Role Modeling (ORM) is a powerful method for designing and querying information systems at the conceptual level. It is an easy and understandable description of the application for non-technical users.

    What’s the use of Response.Output.Write()?

    We can write formatted output using Response.Output.Write().

    4 What is the Global Assembly Cache (GAC)?

    Ans: The Global Assembly Cache is a machine-wide code cache that is stored in a folder in the Windows directory. It stores the .NET assemblies that are specifically designated to be shared by all applications executed on the system.

    2 What is the difference between the While and For loop? Provide a .NET syntax for both loops?

    Ans: The For loop provides a concise way of writing the loop structure, but the While loop is a control flow statement that allows repetitive execution of the code. Initialization, condition checking, iteration statements are written at the top of the For loop, but only initialization and condition checking is done at the top of the while loop.


    What is the difference between ASP and ASP .NET?

    The key difference between them is that ASP is interpreted as scripts are used, whereas ASP.NET is compiled because of these pages using .NET languages. ASP .Net pages are to be MSIL(Microsoft Intermediate Language) compiled.

    1 List the events in page life cycle.

    1) Page_PreInit 2) Page_Init 3) Page_InitComplete 4) Page_PreLoad 5) Page_Load 6) Page_LoadComplete 7) Page_PreRender 8) Render

    What are the most important aspects of .NET?

    Ans: .NET is an open-source platform containing around 32 programming languages and several tools for application creation. It is highly secure and runs comfortably on multiple computer platforms.

    What languages does the .NET Framework support?

    Ans: .NET Framework supports over 60 programming languages, out of these 11 programming languages are designed and developed by Microsoft.

    What are managed and unmanaged codes?

    Ans: Managed code runs inside CLR and installing the .NET Framework is necessary to execute it. Unmanaged code does not depend on CLR for execution and is developed using languages outside the .NET framework.

    .NET Interview Questions and Answers | ASP.NET Interview Questions and Answers | Edureka

    Related Posts

    Leave a Reply

    Your email address will not be published. Required fields are marked *