Вы находитесь на странице: 1из 8

Asp.

Net Web Development Interview Questions


1. Whats the difference between Response.Write() andResponse.Output.Write()? Response.Output.Write() allows you to write formatted output. 2. 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. 3. When during the page processing cycle is ViewState available? After the Init() and before the Page_Load(), or OnLoad() for a control. 4. What namespace does the Web page belong in the .NET Framework class hierarchy? System.Web.UI.Page 5. Where do you store the information about the users locale? CodeBehind is relevant to Visual Studio.NET only. 6. Whats the difference between Codebehind="MyCode.aspx.cs" andSrc="MyCode.aspx.cs"? CodeBehind is relevant to Visual Studio.NET only. 7. What is the Global.asax used for? The Global.asax (including the Global.asax.cs file) is used to implement application and session level events. 8. What are the Application_Start and Session_Start subroutines used for? This is where you can set the specific variables for the Application and Session objects. 9. Whats an assembly? Assemblies are the building blocks of the .NET framework;

10. Whats MSIL, and why should my developers need an appreciation of it if at all? MSIL is the Microsoft Intermediate Language. All .NET compatible languages will get converted to MSIL. MSIL also allows the .NET Framework to JIT compile the assembly on the installed computer. 11. Which method do you invoke on the DataAdapter control to load your generated dataset with data? The Fill() method. 12. Can you edit data in the Repeater control? No, it just reads the information from its data source. 13. Which template must you provide, in order to display data in a Repeater control? ItemTemplate. 14. Name two properties common in every validation control? ControlToValidate property and Text property. 15. What base class do all Web Forms inherit from? The Page class. 16. What is the difference between Server.Transfer and Response.Redirect? Why would I choose one over the other? Server.Transfer transfers page processing from one page directly to the next page without making a round-trip back to the client's browser. This provides a faster response with a little less overhead on the server. Server.Transfer does not update the clients url history list or current url. Response.Redirect is used to redirect the user's browser to another page or site. This performas a trip back to the client where the client's browser is redirected to the new page. The user's browser history list is updated to reflect the new address 17. What is ViewState? ViewState allows the state of objects (serializable) to be stored in a hidden field on the page. ViewState is transported to the client and back to the server, and is not stored on the server or any other external source. ViewState is used the retain the state of server-side objects between postabacks.

18. What is the lifespan for items stored in ViewState? Item stored in ViewState exist for the life of the current page. This includes postbacks (to the same page). 19. What does the "EnableViewState" property do? Why would I want it on or off? It allows the page to save the users input on a form across postbacks. It saves the server-side values for a given control into ViewState, which is stored as a hidden value on the page before sending the page to the clients browser. When the page is posted back to the server the server control is recreated with the state stored in viewstate. 20. What are the different types of Session state management options available with ASP.NET? ASP.NET provides In-Process and Out-of-Process state management. In-Process stores the session in memory on the web server. This requires the a "sticky-server" (or no load-balancing) so that the user is always reconnected to the same 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 management requires that all objects stored in session are serializable.

Interview Question In .Net 2.0

1. Why are Server control tags shown in the browser instead of the controls it represents? This is because the server control tags were not converted into their respecting HTML element tags by ASP.Net. This happens when ASP.Net is not properly registered with IIS. .Net framework provides an Administration utility that manages the installation and uninstallation of multiple versions of ASP.NET on a single machine. You can find the file in C:\WINNT\Microsoft.NET\Framework\v**\aspnet_regiis.exe use the command: aspnet_regiis.exe -u ---> to uninstall current asp.net version. use the command: aspnet_regiis.exe -i ---> to install current asp.net version 2. What are the Best practices for side-by-side execution of Framework 1.1 and 2.0?

In ASP.NET, applications are said to be running side by side when they are installed on the same computer, but use different versions of the .NET Framework. 3. Can I have VS.NET and the Visual Studio 6.0 installed on the same machine? Yes! VS.Net works with the .Net framework, while VS6.0 works with MFC or the Windows API directly, for the most part. They can be installed and run on the same machine without any considerations. 4. What is Assembly name and name space? An assembly is a logical unit of code. Physically it may exist as dll or an exe. which can contain one or more files and they can be any file types like image files, text files etc. along with DLLs or EXEs.When you compile your source code by default the exe/dll which is generated is actually an assemblyand every assembly file contains information about itself which is called as Assembly Manifest.Namespace is an abstract container providing context for the items it holds and allows disambiguation of items having the same name (residing in different namespaces. It can also be said as a context for identifiers. So under a namespace you can have multiple assemblies. 5. what is capacity of dataset? DataSet is logical represantation of database so it can store as much as database. 6. What is deployment? How do you deploy .Net and Java applications Deployment - It is the procedure to deploy Web Application on the Server. You can deploy .Net application by simply Xcopy and create virtual directory for the application on server. 7. Where this DataSet is Stored? Dataset is an in-memory representation of a database. Its stored no where but in memory. Goes off when GC stats after a littl sleep. 8. How different are interface and abstract class in .Net? When a class is not provided with full functionalitythen it is declared as abstract.it doesn't support instance creation as well as it cannot be overridable to child class.interface is a colection of methods only without functionality.interface is 90% same as abstract class. 9. How does vs.net 2005 support biztalkserver?

if you install biztalk server it provides Biztalk Project in the project types like webproject, windows project, console project. We use rest of the products of the Biztalk like adapters and all those thing and use them in .net. 10. what is marshling? Marshaling performs the necessary conversions in data formats between managed and unmanaged code.CLR allows managed code to interoperate with unmanaged code usining COM Marshaler(Component of CLR). 11. Can you explain the difference between an ADO.NET Dataset and an ADO Recordset?

o o o o o o o

A DataSet can represent an entire relational database in memory, complete with tables, relations, and views. A DataSet is designed to work without any continuing connection to the original data source. Data in a DataSet is bulk-loaded, rather than being loaded on demand. There's no concept of cursor types in a DataSet. DataSets have no current record pointer You can use For Each loops to move through the data. You can store many edits in a DataSet, and write them to the original data source in a single operation. Though the DataSet is universal, other objects in ADO.NET come in different versions for different data sources.

12. In .NET Compact Framework, can I free memory explicitly without waiting for garbage collector to free the memory? .NET Compact Framework come with CLR which perform automatic garbage collector to free the memory without using destector(perform garbage collector when is declear)

Questions On Dataset In Asp.Net

1. When was ASP.NET released? ASP.NET is a part of the .NET framework which was released as a software platform in 2002. 2. What is CLR? Common Language Runtime (CLR) is a run-time environment that manages the execution of .NET code and provides services like memory management, debugging, security, etc. 3. In Visual Studio .NET, how do I create a new ASP.NET application for an existing ASP.NET project? First create an IIS application using the IIS MMC. Then in Visual Studio .NET, use the "New Project In Existing Folder" project template (at the end of the template list). It will first ask you for the project name (use the same one you created for the IIS application). Click OK button. Then enter in physical folder location. 4. What is the Difference between HTML controls and ASP.net Controls? HTML controls are run on client side, where as ASP.net controls runs on server side and for execute on client side, they generate HTML controls. 5. Can a .NET web application consume Java web service ? Yes.Actually Webservices are independent to language. it depends on WSDL and SOAP. so any one can develope the Webservices anddisclose the wsdl and users can cosume the webservices.wsdl and soap both are xml based.. and all languages having xml parsing capability and access to http protocol will be able to work with Webservices

6. How to click or select a row in gridview using c# code? We should use the Currency CurrencyManager cmGrid = (CurrencyManager)this.BindingContext[gridview.DataSource, gridview.DataMember]; cmGrid.Position = iIndex; 7. What is IPostBack? How to use it? Ispostback event is generated by the web controls to alert the server to take respected action of the event generated. When the button is clicked then click event is generated which further cause ispostback event & it alerts the server to take respected action during postback event. 8. ColumnMapping belongs to which namespaces? ColumnMapping belongs to System.Data 9. Can you give an example of when it would be appropriate to use a web service as opposed to a non-serviced .NET component when there is no .Net framework installed in one of the communicating applications 10. In order to get assembly info whcih namespace we should import? system.reflection 11. Which method do you invoke on the DataAdapter control to load your generated dataset with data? dataadapter.fill(dataset object) 12. Enumerate the types of Directives? o @ Page directive o @ Assembly directive o @ Import directive o @ Reference directive o @ Implements directive o @ OutputCache directive o @ Register directive

13. What is a DataReader? A DataReader is a read-only stream of data returned from the database as the query executes. It only contains one row of data in memory at a time and is restricted to navigating forward only in the results one record at a time. The DataReader does support access to multiple result sets, but only one at a time and in the order retrieved. Just as in the original version of ADO, the data is no longer available through the DataReader once the connection to the data source is closed, which means a DataReader requires a connection to the database throughout its usage. Output parameters or return values are only available through the DataReader once the connection is closed. 14. Why DataReader Useful? Data Reader is Read only version Data Set,Each record is returned as a Data Reader Object,ExecuteReader method acts directly on the database connection. There are two versions of the data reader object: OleDbDataReader and SqlDataReader 15. Differnce B/w DataReader and DataSet The Dataset is an core of disconnected architecture.Disconnected architecture means once you have retriveed the data from the database the connect of the datasource is dropped.The disconnected data become very commonlyThe dataset for the disconnected data from the Dataset object.The DataReader is an readonly ,forward only stream from the database.While using the datareader can improve the application performance reduce the system overhead because only one buffer row at a time in memory.

Вам также может понравиться