.NET Interview Questions and Answers Part 4

By
1.)What is Pinvoke ?                                                                                                                       
Pinvoke(Platform invoke) is a service that enables managed code to call unmanaged functions implemented in DLLs  (dynamic-link libraries), such as those in the Win32 API.
2.)Is it true that COM objects no longer need to be registered on the server??     
Yes. It is true that COM objects no longer need to be registered on the server.
3.) Can .NET Framework components use the features of Component Services?
Yes, we can use the features and functions of Component Services from a .NET Framework component. 
4.) What are server controls in ASP.NET ?                                                                            
The Server controls are components that run on the server and encapsulate user-interface and other related functionality. They are used in ASP.NET pages and in ASP.NET code-behind classes.
4.) What is the difference between Web User Control and Web Custom Control ?  
    
 Web User Control :-    
  1. It is easier to create user controls.
  2. It can not be added to toolbox in visual studio.
  3. It is very good for static layout.
  4. It provide support for consumers who use a visual design tool.
  5. For this control, a separate copy of control is required in each application.                       
 Web Custom Control :-
  1. It is harder to create web custom controls.
  2. It can be added to toolbox in visual studio.
  3. It  is good for dynamic layout.
  4. It provides full support for visual design tool's consumers.
  5.  For this control, a single copy of control is required in the global assembly cache.          
5.) How do you use CSS in asp.net application?                                                                 
We use CSS Style sheet inside <head> tag of the  HTML Documents.We can add a link in CSS Style sheet as follows:-
<html>
<title></title>
<head>
<LINK rel="Stylesheet" TYPE="text/css" href="Sheet.css">
</head>
</html>

Note :- Here  Sheet.css is the name of your External  CSS  Style sheet.
6.)    What is the namespace used for encryption in .net ?                                              
 Using System.Security.Cryptography

7.)      What is the difference between control and component ?                                  
Component and Control :-
  1. A component is a class that implements the Icomponent interface.
  2. A component does not draw itself on the form but a control draws itself on the form.
  3. Component and control both can be dragged and dropped on the design form.
  4. All controls are the components but all components are not controls.
  5. All controls are placed inside the form but all components are placed below the form area.
  6. all components are visible during the design time but not visible to run time. 
  7. All controls are visible in both during design and run time .
  8. Components Examples:- MenuScripts , OpenDialogbox,timer ,PrintDialog , PrintDocumet , DataSource etc.
  9. Controls Examples:- TextBox ,Button ,Label ,ImageControl etc.
  10. If you want to increase functionality without User Interface(UI) then you can use Components.
8.)  What are the different modes for the sessionstates in the web.config file ?    
  • Off :-It Shows that session state is not enabled.
  • SQL Server :- It Shows that session state is stored on the SQL Server.
  • InProc :- It Shows that session state is stored locally.
  • StateServer :-It Shows that session state is stored on a remote server.
9.) What can we say,.NET is a run time services or a development platform ?     
It is both and more. Microsoft .NET includes a new way of delivering software and services to businesses and customers. A part of Microsoft.NET is the .NET Frameworks. The .NET frameworks SDK consists of two parts,first the .NET common language runtime and the second .NET class library. In addition, the SDK also includes command-line compilers for C#, JScript, C++ and VB. we use these compilers to build applications and components. These components require the runtime to execute so this is a development platform.
10.) Which namespace is the base class for .net Class library?                                  
Using system.Object

1 comment:

  1. How to name and image insert, display, update and delete in winform with c#. All data work with sql database.
    Kindly help me soon

    ReplyDelete

Powered by Blogger.