This is a discussion on .Net Interview Questions within the Interview Questions forums, part of the Interviews and Job Listings category; Sir, I am sending some interview questions.I am remembering the entire thing.Please excuse if some rubbish questions are there.Please answer ...
|
|||||||
|
|||
|
Re:.Net Interview Questions
Sir,
I am sending some interview questions.I am remembering the entire thing.Please excuse if some rubbish questions are there.Please answer the questions .I am giving some options given to me from by memory.Not all options are there.If possible please explain in detail. so that it will help every one Thanking you Pramod.M Qusetions 1.User is giving \"false\" as the second argument of Response.Redirect what will happen a)not compile at all b)executes .... 2)which object is fastest when reading from database a)dataset b)data reader c)xml clause. 3)while using the custom control if the user is putting the background property to blue in the on_init function.What will happen if he is viewing this in design mode a)blue background b)white c)error 4)same question but the property will be taken from web.config what will happen in the design mode? 5)If the user is setting a session variable at session_onstatr and the loging mode is user authentication.What will happene when the application starts a)session is started so no probs b)error c)only after loging in he will get this 6)one user custom control is there in the top.inside this we are defining one more user control.There we are defining the property of the controls what will happen? 7)what is the advantage of server control over all other controls a)only for persistance of data b)fast... 8)where is the best place to declare an event so that it will not affect the view state? a)on_Pageload b)on_init c)on_prerender 9)Refadd=null if(calloffice(officeid,refadd)&&refadd!=null{ do some thing } what will happen here? 10)If same property or configuration is declared in the web.config and machine.config file what will happen? a)web.config is taken b)machine.config is taken c)merge will happen d)error 11)if i want a particular property(style) to applecable to my web page where i have to define it? a)session.cs file b)apllication.aspx.cs file.. 12)If we want an application to start on start of windows and end on close of windows what we have to do? a)build ordinary appln and put in the start menu b)use windows service .. 13)If I am writing an element \"<web.usercontrols>\" in web.config what will happen 14)what is typed dataset 15)which is the best way to handle exception a)throw every exception and catch it and throw it again and caught by user defined exception b)catch at SystemGUI level c)throw each exception and catch it .. 16)befor opening vs.net if we are deleting all the dlls in the bin directory what will happen? 17)User has got 5 forms and i am using same grid in all the 5 forms .If the reference for all these grids are in the base class for this pages what will happen? 18)How c# files are stored? a)binary b)byte c)byte[],bit .. 19)for serializing an object the object must implement which interface? a)Iuserserialize.... 20)For asynchronously executing two processes what will we user? a)thread .. 21)ForXML Clause is used for |
| Sponsored Links |
|
|||
|
Re:.Net Interview Questions
1.User is giving \"false\" as the second argument of Response.Redirect what will happen a)not compile at all b)executes ....
Answer: b)executes Explanation: If you want to get rid of this exception, use Response.Redirect(url, false). Instead of putting Response.Redirect into Try..Catch block. You may try this one: Dim url As String Try url = Application(\"sRoot\" & \"Prva.aspx\"Catch ex As Exception Dim Greska As String Greska = ex.Message Greska = ex.ToString() url = Session(\"sRoot\" & \"GlobalError.aspx?ER=\" & GreskaEnd Try Response.Redirect(url, False) 2)which object is fastest when reading from database a)dataset b)data reader c)xml clause. Answer: It\'s bit difficult one to answers, the answer would be either dataset or datareader depending on waht you are trying to accomplish. In most cases Datareader would be the appropriate answer. Explanation: Use the DataReader Class These are the ideal situations when you should use the DataReader class: The data that you are retrieving must always be fresh, and therefore must be retrieved from the database each time you need it. There is less overhead associated with creating a DataReader class, and performance over DataSet improves rapidly with increasing load. You plan to make several repeated calls to the database to retrieve small pieces of information. The performance data referred to in the first bullet applies to an even greater scale here. It is true that many of the features that make DataSet classes great, such as the ability to set up relations between tables, are better left to client-based Windows Forms applications. There are numerous occasions, however, when DataSet classes are preferable to DataReader classes, and a few where you cannot use DataReader classes at all. Use the DataSet Class Here\'s when you should consider using the DataSet class: You are building a Web service that uses the data you are retrieving as the return value. Because DataReader classes maintain a connection to the database, they cannot be serialized into XML and therefore cannot be transmitted over the wire to the caller of a Web service. You need to sort or filter data. Before using a DataView object (exposed as the DefaultView property of DataTable classes, which comprise a DataSet class) to sort or filter your data, first try to use SQL query constructs—such as the WHERE and ORDER BY clauses—to do it for you, and use the more lightweight and faster DataReader class. Sometimes, however, this is not possible or you might need to sort or filter the data more than once. You need to iterate through the data more than once on the same request. You can only loop through DataReader once. If, for example, you need to bind more than one ServerControl class to the same set of data, DataSet is the more appropriate solution. DataReader cannot be bound to more than one ServerControl class because it is forward-only. The data would have to be retrieved twice from the database in order for DataReader to be used in this situation. Still, DataSet classes undoubtedly play an important role in an ASP.NET Web application of any significant size or complexity. You can reduce the \"performance penalty\" of DataSet classes by judicious caching to minimize database round-trips. Both DataReader and DataSet are essential pieces of a successful ASP.NET Web application. It\'s just important to know when and where each is used best. Read this article : http://www.ftponline.com/vsm/2003_02...efault_pf.aspx 3)while using the custom control if the user is putting the background property to blue in the on_init function.What will happen if he is viewing this in design mode a)blue background b)white c)error Answer: I don\'t have anser from top of my head , please read this article and practice the excersize , let us know the answer. Explanation: http://www.15seconds.com/issue/040421.htm4) Questions 6,7 and 13: 6)one user custom control is there in the top.inside this we are defining one more user control.There we are defining the property of the controls what will happen? 7)what is the advantage of server control over all other controls a)only for persistance of data b)fast... 13)If I am writing an element \"<web.usercontrols>\" in web.config what will happen Here is very good Questions and Ansers for any Server Controls and User controls Questions. The one of the big advantages of custom (precompiled) controls over user controls. You can install a custom control to the Global Assembly Cache on the server so that every application on the server can share it. http://msdn.microsoft.com/chats/vstu...dio_032102.asp 19)for serializing an object the object must implement which interface? Please read this very nice tutorial on this http://msdn.microsoft.com/library/de..._an_object.asp http://www.topxml.com/xmlserializer/..._an_object.asp 20)For asynchronously executing two processes what will we user? Read this one to get an overview on Multi Threading Concept http://msdn.microsoft.com/msdnmag/is...T/default.aspx Sample Code Download: http://download.microsoft.com/downlo...35/NET0401.exe 8)where is the best place to declare an event so that it will not affect the view state? ADO.NET Examples and Best Practices : Download this 39 page document with sample code http://www.vslive.com/2002/sf/Chapter_1-2.pdf 14)what is typed dataset A typed DataSet is a class that derives from a DataSet. As such, it inherits all the methods, events, and properties of a DataSet. Additionally, a typed DataSet provides strongly typed methods, events, and properties. This means you can access tables and columns by name, instead of using collection-based methods. Aside from the improved readability of the code, a typed DataSet also allows the Visual Studio .NET code editor to automatically complete lines as you type. Additionally, the strongly typed DataSet provides access to values as the correct type at compile time. With a strongly typed DataSet, type mismatch errors are caught when the code is compiled rather than at run time. Here are the few articles on Typed Dataset: http://www.ondotnet.com/pub/a/dotnet...notations.html http://msdn.microsoft.com/library/de...pedDataSet.asp 21)ForXML Clause is used for With the release of SQL Server 2000, a lot more support and functionality for XML was included in the product. In this article we would target at some of the out of the box functionality that SQL Server 2000 offers us to convert our relational data as XML formatted data. Not wasting much of the time lets get into the usage of these functionality into our application ... Well, New with SQL Server 2000 is the ability to return the results of a query in XML format. This is accomplished by adding the FOR XML clause at the end of the SELECT statement. The syntax is as follows: FOR XML mode [, XMLDATA] [, ELEMENTS] [, BINARY BASE 64] The arguements in the braket suggest that these are optional. But lets understand each of these components before proceeding further. Please read with syntax in detail here http://www.extremeexperts.com/sql/articles/ForXML.aspx will update with more answeers soon.... 12)If we want an application to start on start of windows and end on close of windows what we have to do? a)build ordinary appln and put in the start menu b)use windows service Answer: b)use windows service Post edited by: sanereddy, at: 2004/08/07 20:10 |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Robert Bosch Interview Pattren and sample questions | admin | Interview Process and Patterns | 0 | 05-26-2005 08:18 AM |
| Live DataStage Interview Questions | admin | Interview Questions | 0 | 05-24-2005 07:18 PM |
| comp.archives.msdos.{announce,d} FAQ (Frequently Asked Questions) | Timo Salmi | Tech FAQ | 0 | 10-04-2004 07:06 AM |
| comp.lang.c Answers to Frequently Asked Questions (FAQ List) | Steve Summit | Tech FAQ | 0 | 07-03-2004 08:27 PM |
| .NET Interview Questions Doc | kashifkhan | Interview Questions | 2 | 07-01-2004 01:52 AM |