Vous êtes sur la page 1sur 10

How many languages .NET is supporting now? When .NET was introduced it came with several languages. VB.

NET, C#, COB OL and Perl, etc. The site DotNetLanguages.Net says 44 languages are supported. 32. What is smart navigation? The cursor position is maintained when the page gets refreshed due to th e server side validation and the page gets refreshed. 33. How do you validate the controls in an ASP .NET page? Using special validation controls that are meant for this. We have Range Validator, Email Validator 34. How do you turn off cookies for one page in your site? Use Cookie.Discard property, Gets or sets the discard flag set by the se rver. When true, this property instructs the client application not to save the Cookie on the user's hard disk when a session ends. 35. Which two properties are on every validation control? We have two common properties for every validation controls: Control to Validate Error Message What is boxing and unboxing? Implicit conversion of value type to reference type of a variable is kno wn as BOXING, for example integer to object type conversion. Conversion of reference type variable back to value type is called as UnBoxing. 37. What is garbage collection? Garbage collection is a system whereby a run-time component takes respon sibility for managing the lifetime of objects and the heap memory that they occu py. 38. What is serialization? Serialization is the process of converting an object into a stream of by tes. Deserialization is the opposite process of creating an object from a stream of b ytes. Serialization / Deserialization is mostly used to transport objects. 39. What is the differnce between Managed code and unmanaged code? Managed Code: Code that runs under a "contract of cooperation" with the common language runtime. Managed code must supply the metadata necessary for the runtimeto provide services such as memory management, cross-language integratio n, code access security, and automatic lifetime control of objects. All code bas ed on Microsoft intermediate language (MSIL) executes as managed code. Un-Managed Code:Code that is created without regard for the conventions and requ irements of the common language runtime. Unmanaged code executes in the common l anguage runtime environment with minimal services (for example, no garbage colle ction, limited debugging, and so on). 40. What is difference between constants, readonly and, static? Constants: The value can t be changed. Read-only: The value will be initialized only once from the constructor of the c lass. Static: Value can be initialized once. In which event are the controls fully loaded? Page_load event guarantees that all controls are fully loaded. Controls are also accessed. In Page_Init events but you will see that viewstate is not fully loaded during t his event. 42. What is the use of @ Register directives? @Register directive informs the compiler of any custom server control ad ded to the page. 43. Define RequiredFieldValidator? It checks whether the control have any value. It's used when you want th e control should not be empty.

44. What are the different types of Session state management options availab le with ASP.NET? ASP.NET provides In-Process and Out-of-Process state management. In-Proc ess stores the session in memory on the web server. Out-of-Process Session state management stores data in an external data source. The external data source may be either a SQL Server or a State Server service. Out-of-Process state manageme nt requires that all objects stored in session are serializable. 45. What are the difference between const and readonly? A const can not be static, while readonly can be static. A const need to be declared and initialized at declaration only, while a readonl y can be initialized at declaration or by the code in the constructor. A const s value is evaluated at design time, while a readonly s value is evaluated a t runtime. What is the difference between early binding and late binding? Calling a non-virtual method, decided at a compile time is known as earl y binding. Calling a virtual method (Pure Polymorphism), decided at a runtime is known as l ate binding. 47. What is the difference between ASP Session and ASP.NET Session? Asp.net session supports cookie less session & it can span across multip le servers. 48. What is Common Language Runtime? CLR also known as Common Language Run time provides a environment in whi ch program are executed, it activate object, perform security check on them, lay them out in the memory, execute them and garbage collect them. 49. What is Intermediate Language? MSIL are also known as Microsoft Intermediate Language is the CPU-indepe ndent instruction set into which .Net framework programs are compiled. It contai ns instructions for loading, storing initializing, and calling methods on object s. 50. What is CTS? The Common type system is a rich type system, built into the common lang uage runtime, which supports the types and operations found in most programming languages. Can we disable ViewState, If, yes how? ViewState can be disabled by using "EnableViewState" property set to fal se. 52. Can you give an example of what might be best suited to place in the App lication_Start and Session_Start subroutines? All the global declarations or the variables used commonly across the ap plication can be deployed under Application_Start. All the user specific tasks o r declarations can be dealt in the Session_Start subroutine. 53. What is an assembly? Assemblies are the building blocks of the .NET framework. They are the l ogical grouping of the functionality in a physical file. 54. What are different types of Assemblies? Single file and multi file assembly. Assemblies can be static or dynamic. Private assemblies and shared assemblies. 55. Which method do you invoke on the DataAdapter control to load your gener ated dataset with data? DataAdapter s fill () method is used to fill load the data in dataset. What is a Literal Control? The Literal control is used to display text on a page. The text is progr ammable. This control does not let you apply styles to its content. 57. Which namespaces are used for data access?

System.Data System.Data.OleDB System.Data.SQLClient 58. What is Remoting? Remoting is a means by which one operating system process, or program, c an communicate with another process. The two processes can exist on the same com puter or on two computers connected by a LAN or the Internet. 59. What s the use of GLOBAL.ASAX file? It allows to executing ASP.NET application level events and setting appl ication-level variables. 60. What is a SESSION and APPLICATION object? Session object store information between HTTP requests for a particular user. Session variables are used to store user specific information where as in applic ation variables we can t store user specific information. while application object are global across users. How is method overriding different from overloading? When Overriding, you change the method behavior for a derived class. Overloading simply involves having a method with the same name within the class. 62. What is the difference between System.String and System.StringBuilder cl asses? System.String is immutable. System.StringBuilder was designed with the purpose of having a mutable string wh ere a variety of operations can be performed. 63. What is the differences between Server-side and Clientside code? Server side code is executed at the server side on IIS in ASP.NET framework. while client side code is executed on the browser. 64. What s an interface? It s an abstract class with public abstract methods all of which must be i mplemented in the inherited classes. 65. What is a formatter? A formatter is an object that is responsible for encoding and serializin g data into messages on one end, and deserializing and decoding messages into da ta on the other end. 66. What is a DataSet? A DataSet is an in memory representation of data loaded from any data so urce. 67. What is a DataTable? A DataTable is a class in .NET Framework and in simple words a DataTable object represents a table from a database. 68. What is a life span of a static variable? A static variable s life span is till the class is in memory 69. What is the difference between an abstract method & virtual method? An Abstract method does not provide an implementation and forces overrid ing to the deriving class (unless the deriving class also an abstract class), Virtual method has an implementation and leaves an option to override it in the deriving class. Thus Virtual method has an implementation & provides the derived class with the option of overriding it. Abstract method does not provide an imp lementation & forces the derived class to override the method. 70. How many namespaces are in .NET version 1.1? 124 What is AutoPostback? AutoPostBack automatically posts the page back to the server when state of the control is changed. 72. What is Globalization? Globalization is the process of creating multilingual application by def ining culture specific features like currency, date and time format, calendar an d other issues.

73.

What is the main difference between Asp.net and Vb.net?

Asp.net is a web technology used for designing webforms and Vb.net is a programm ing language ASP.NET is a powerful technology for writing dynamic web pages. ASP.NET is a way of creating dynamic web pages while making use of the innovatio ns present in .NET. VB.NET is a language.But ASP.NET is the Environment where we can create websites or webpages. 74. Is string a value type or a reference type? Srting is a Reference type.It can create a new instance at every time. 75. What base class do all Web Forms inherit from? System.web.UI.Page class What is the difference between an ADO.NET Dataset and an ADO Recordset? A DataSet can represent an entire relational database in memory, complete with t ables, relations, and views. A DataSet is designed to work without any continuing connection to the original data source. DataSets have no current record pointer You can use For Each loops to move throu gh the data. Though the DataSet is universal, other objects in ADO.NET come in different vers ions for different data sources. Data in a DataSet is bulk-loaded, rather than being loaded on demand. You can store many edits in a DataSet, and write them to the original data sourc e in a single operation. 77. What are the validation controls? A set of server controls included with ASP.NET that test user input in H TML and Web server controls for programmer-defined requirements. Validation cont rols perform input checking in server code. If the user is working with a browse r that supports DHTML, the validation controls can also perform validation using client script. 78. What is the difference between Web.config and Machine.Config ? Web.config files apply settings to each web application. While Machine.config file apply settings to all ASP.NET applications. 79. What is event bubbling? Server controls like Data grid, Data List, and Repeater can have other c hild controls inside them. Example Data Grid can have combo box inside data grid . These child control do not raise there events by themselves, rather they pass the event to the container parent (which can be a data grid, data list, repeater ), which passed to the page as ItemCommand event. As the child control send events to parent it is termed as event bubbling. 80. What is the use of @ Register directives? @Register directive informs the compiler of any custom server control ad ded to the page. 81. ? What are the various security methods which IIS Provides apart from .NET

The various security methods which IIS provides are : Authentication Modes. IP Address and Domain Name Restriction. DNS Lookups DNS Lookups. Though the DataSet is universal, other objects in ADO.NET come in different vers ions for different data sources. The Network ID and Subnet Mask. SSL.

82.

What are Master Pages in ASP.NET? ASP.NET master pages allow you to create a consistent layout for the pag es in your application. A single master page defines the look and feel and stand ard behavior that you want for all of the pages in your application. You can the n create individual content pages that contain the content you want to display. When users request the content pages, they merge with the master page to produce output that combines the layout of the master page with the content from the co ntent page. 83. What are the advantages of ASP.Net? ASP.NET makes development simpler and easier to maintain with an event-driven, s erver-side programming model. ASP.NET offers built-in security features through windows authentication or othe r authentication methods. Content and program logic are separated which reduces the inconveniences of prog ram maintenance. Built-in caching features. 84. What is event bubbling? Server controls like Data grid, Data List, and Repeater can have other c hild controls inside them. Example Data Grid can have combo box inside data grid . These child control do not raise there events by themselves, rather they pass the event to the container parent (which can be a data grid, data list, repeater ), which passed to the page as ItemCommand event. As the child control send events to parent it is termed as event bubbling. 85. What is WSDL? WSDL stands for Web Services Description Language is an XML-based langua ge for describing Web services and how to access them. WSDL is used to describe Web services. What is the use of @ Register directives? @Register directive informs the compiler of any custom server control ad ded to the page. 87. What is the difference between javascript and vbscript? Javascript : JavaScript is a client-side scripting language. JavaScript is used to create interactive web applications supported by the Netsc ape browser. JavaScript is simple to use, lightweight, and dynamic. Developers can easily emb ed code functionality for interactive applications inside a web page. Javascript is case sensitive and it will be run on client side. VBScript: VBScript is a server-side scripting language. VBScript is not case sensitive and it will be run on server side. 88. What is a web server? A web server delivers requested web pages to users who enter the URL in a web browser. Every computer on the Internet that contains a web site must have a web server program. 89. What are Cascading style sheets? Cascading style sheets (CSS) collect and organize all of the formatting information applied to HTML elements on a Web form. Because they keep this infor mation in a single location, style sheets make it easy to adjust the appearance of Web applications. 90. What is the base class of .net? System.object What is difference between abstract classes and interfaces? Abstract classes can have concrete methods while interfaces have no meth ods implemented. Interfaces do not come in inheriting chain, while abstract classes come in inher itance. 92. What is GAC or Global Assembly Cache?

Global Assembly Cache (GAC) is a common place to share the .NET assembli es across many applications. GAC caches all strong named assembly references wit hin it. All System assemblies that come with the .NET framework reside in the GA C. 93. What is a HashTable? The Hashtable object contains items in key/value pairs. The keys are use d as indexes, and very quick searches can be made for values by searching throug h their keys. 94. What is CAS or Code Access Security? Code Access Security - CAS is the part of the .NET security model that d etermines whether or not a piece of code is allowed to run, and what resources i t can use when it is running. 95. What is the Composite Custom Control? Combination of existing HTML and Server Controls What base class do all Web Forms inherit from? System.web.UI.Page class 97. What is the difference between System.String and System.Text.StringBuild er classes? System.String is immutable. System.StringBuilder was designed with the purpose of having a mutable string wh ere a variety of operations can be performed. 98. How to Create a Cookie? Cookie are one of several ways to store data about web site visitors dur ing the time when web server and browser are not connected. Common use of cookie s is to remember users between visits. Practically, cookie is a small text file sent by web server and saved by web browser on client machine. The Response.Cookies command is used to create cookies. 99. How do you identify a Master Page? The master page is identified by a special @ Master directive that repla ces the @ Page directive that is used for ordinary .aspx pages. 100. Explain what a diffgram is and a good use for one? The DiffGram is one of the two XML formats that you can use to render Da taSet object contents to XML. For reading database data to an XML file to be sen t to a Web Service What are the different types of Validation Controls? There are six types of validation controls available : RequiredFieldValidator RangeValidator RegularExpressionValidator CompareValidator CustomValidator ValidationSummary 102. What is the Web User Control? Combines existing Server and/or HTML controls by using VS.Net to create functional units that encapsulate some aspects of UI. Resides in Content Files, which must be included in project in which the controls are used. 103. What namespaces are necessary to create a localized application? System.Globalization System.Resources 104. How to Manage State in ASP.Net? There are several ways to manage a state. ViewState QueryString Cookies Session Application 105. What are the different types of Caching?

There are three types of Caching : Output Caching: stores the responses from an asp.net page. Fragment Caching: Only caches/stores the portion of page (User Control) Data Caching: is Programmatic way to Cache objects for performance. What is Side-by-Side Execution? The CLR allows any versions of the same-shared DLL (shared assembly) to execute at the same time, on the same system, and even in the same process. This concept is known as side-by-side execution. 107. How to view an assembly? We can use the tool "ildasm.exe" known as "Assembly Disassembler" to vie w the assembly. 108. Which are the namespaces that are imported automatically by Visual Studi o in ASP.Net? There are 7 namespaces which are imported automatically. System System.Collections System.IO System.web System.web.UI System.web.UI.HTMLControls System.web.UI.WebControls. 109. What are the layouts of ASP.NET Pages? GridLayout FlowLayout GridLayout positions the form object on absolute x and y co-ordinates of the scr een. FlowLayout positions the form objects relative to each other. 110. What is Delegates? Delegates are a type-safe, object-oriented implementation of function po inters and are used in many situations where a component needs to call back to t he component that is using it. Delegates are generally used as basis of events, which allow any delegate to easily be registered for as event. What is a Namespace? What is the use of a namespace? Namespaces are logical grouping of classes and other types in hierarchi cal structure. Namespaces are useful to avoid collision or ambiguity among the classes and type names. Another use of the namespace is to arrange a group of classes for a specific pur pose. 112. What s the difference between Codebehind="MyCode.aspx.cs" and Src="MyCode. aspx.cs"? Visual Studio uses the Codebehind attribute to distinguish the page sour ce or programming logic from the design. Also the src attribute will make the pa ge compile on every request. That is the page will not be compiled in advance an d stored in the bin as a dll instead it will be compiled at run time. 113. How many classes can a single .NET DLL contain? It can contain many classes. 114. What methods are fired during the page load? Init() - when the page is instantiated. Load() - when the page is loaded into server memory. PreRender() - the brief moment before the page is displayed to the user as HTML. Unload() - when page finishes loading. 115. What is the difference between Value Types and Reference Types? Value Types uses Stack to store the data. where as Reference type uses the Heap to store the data.

What is web.config file? Web.config file is the configuration file for the Asp.net web applicatio n. There is one web.config file for one asp.net application which configures the particular application. Web.config file is written in XML with specific tags ha ving specific meanings.It includes databa which includes connections,Session Sta tes,Error Handling,Security etc. 117. What is the difference between in-proc and out-of-proc? An Inproc is one which runs in the same process area as that of the clie nt giving tha advantage of speed but the disadvantage of stability becoz if it c rashes it takes the client application also with it. Outproc is one which works outside the clients memory thus giving stability to t he client, but we have to compromise a bit on speed. 118. What is a PostBack? The process in which a Web page sends data back to the same page on the server. 119. Which control would you use if you needed to make sure the values in two different controls matched? CompareValidator is used to ensure that two fields are identical. 120. What is the difference between HTTP-Post and HTTP-Get? The GET method creates a query string and appends it to the script's URL on the server that handles the request. The POST method creates a name/value pairs that are passed in the body of the HT TP request message. What is strong-typing versus weak-typing? Strong typing implies that the types of variables involved in operations are associated to the variable, checked at compile-time, and require explicit c onversion Weak typing implies that they are associated to the value, checked at run-time, and are implicitly converted as required. 122. What is namespace used for loading assemblies at run time and name the m ethods? System.Reflection 123. How big is the datatype int in .NET? 32 bits 124. What is difference between abstract classes and interfaces? Abstract classes can have concrete methods while interfaces have no meth ods implemented. Interfaces do not come in inheriting chain, while abstract classes come in inher itance. 125. How do you turn off cookies in one page of your asp.net application? We may not use them at the max, However to allow the cookies or not, is client side functionality. What s the difference between Response.Write () and Response.Output.Write( )? Response.Outout.Write allows us to write the formatted out put. 127. What is the difference between inline and code behind? Inline code written along with the html and design blocks in an .aspx pa ge. Code-behind is code written in a separate file (.cs or .vb) and referenced by th e .aspx page. 128. What is Common Langauge Specification? CLS also known as Common Language Specification defines the rules which all language must support, in order to be a part of .Net framework. The Common L anguage Specification is a set of constructs and constraints that serves as a gu ide for library writers and compiler writers. 129. Which class deals wit the user s locale information? System.Web.UI.Page.Culture 130. What is the lifespan for items stored in ViewState? Items stored in a ViewState exist for the life of the current page, incl uding the post backs on the same page.

Which template is to be provided in the Repeater control in order to display a d ata? ItemTemplate AlternatingItemTemplate. 132. What are the advantages of an assembly? Increased performance. Better code management and encapsulation. It also introduces the n-tier concepts and business logic. 133. What is an ArrayList? The ArrayList object is a collection of items containing a single data t ype values. 134. What is the difference between a Thread and a Process? A thread is a path of execution that run on CPU, a proccess is a collect ion of threads that share the same virtual memory. A process have at least one thread of execution, and a thread always run in a pr ocess context. 135. What's the difference between the Debug class and Trace class? Documentation looks the same. Use Debug class for debug builds. use Trace class for both debug and release builds. What is the top .NET class that everything is derived from? System.Object 137. What is Marshalling? Marshaling is a process of making an object in one process (the server) availabl e to another process (the client). There are two ways to achieve the marshalling . Marshal by value Marshal by reference. 138. What is a Static class? Static class is a class which can be used or accessed without creating a n instance of the class. 139. What is sealed class Sealed classes are those classes which can not be inherited and thus any sealed class member can not be derived in any other class. A sealed class cannot also be an abstract class. 140. What are the components of web form in ASP.NET? Server controls HTML controls Data controls System components How do you turn off cookies for one page in your site? Use the Cookie. Discard Property which Gets or sets the discard flag set by the server. When true, this property instructs the client application not to save the Cookie on the users hard disk when a session ends. 142. What does assert () do? In debug compilation, assert takes in a Boolean condition as a parameter , and shows the error dialog if the condition is false. The program proceeds wit hout any interruption if the condition is true. 143. What is cookie less session? How it works? By default, ASP.NET will store the session state in the same process tha t processes the request, just as ASP does. If cookies are not available, a sessi on can be tracked by adding a session identifier to the URL. 144. What is the difference between Compiler and Interpreter?

Compiler: A compiler is a program that translates program (called source code) written in some high level language into object code.A compiler translates high-level instr uctions directly into machine language and this process is called compiling. Interpreter: An interpreter translates high-level instructions into an intermediate form, whi ch it then executes. Interpreter analyzes and executes each line of source code in succession, without looking at the entire program; the advantage of interpret ers is that they can execute a program immediately. 145. Where is View State information stored? In HTML Hidden Fields. ASP (Active Server Pages) and ASP.NET are both server side technologies for building web sites and web applications, ASP.NET is Managed compiled code asp is interpreted. and ASP.net is fully Object oriented. ASP.NET has been entirely re-architected to provide a highly productive programm ing experience based on the .NET Framework, and a robust infrastructure for buil ding reliable and scalable web applications. 148. What is the base class of Asp.net? system.Web.UI 149. what is use of web.config? Web.config is used connect database from front end to back end. Web.config is used to maintain the Appsettimgs instead of static variables. 150. What is RangeValidator? RangeValidator - checks whether a value falls within a given range of nu mber, date or string. What is ValidationSummary? ValidationSummary - It show a summary of errors raised by each control o n the page on a specific spot or in a message box. 152. How do you indentify that the page is post back? By checking the IsPostBack property. If IsPostBack is True, the page has been posted back. 153. what are the types of ASP Objects? There are various types of Asp objects Session Object Application Object Server Object Request Object Request Object Response Object Object Context Error Object 154. What are remotable objects in .NET Remoting? Remotable objects are the objects that can be marshaled across the appli cation domains. You can marshal by value, where a deep copy of the object is cre ated and then passed to the receiver. You can also marshal by reference, where j ust a reference to an existing object is passed. 155. What is the difference between ASP Session and ASP.NET Session? Asp.net session supports cookie less session & it can span across multip le servers.

Vous aimerez peut-être aussi