Beruflich Dokumente
Kultur Dokumente
This is a list of questions I have gathered and created over a period of time from my
experience, many of which I felt where incomplete or simply wrong. I have finally taken the
time to go through each question and correct them to the best of my ability. However, please
feel free to post feedback to challenge, improve, or suggest new questions. I want to thank
those of you that have contributed quality questions and corrections thus far.
There are some questions in this list that I do not consider to be good questions for an
interview. However, they do exist on other lists available on the Internet so I felt compelled to
keep them here for easy access.
5. What namespace does the Web page belong in the .NET Framework class
hierarchy?
System.Web.UI.Page
13. Should user input data validation occur server-side or client-side? Why?
All user input data validation should occur on the server at a minimum. Additionally,
client-side validation can be performed where deemed appropriate and feasable to
provide a richer, more responsive experience for the user.
15. Can you explain the difference between an ADO.NET Dataset and an ADO
Recordset?
Valid answers are:
· 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.
17. 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.
18. Can you explain what inheritance is and an example of when you might use
it?
When you want to inherit (use the functionality of) another class. Example: With
a base class named Employee, a Manager class could be derived from the Employee
base class.
21. 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 DataSet object
contents to XML. A good use is reading database data to an XML file to be sent to a
Web Service.
23. Which method do you invoke on the DataAdapter control to load your
generated dataset with data?
The Fill() method.
25. Which template must you provide, in order to display data in a Repeater
control?
ItemTemplate.
26. How can you provide an alternating color scheme in a Repeater control?
Use the AlternatingItemTemplate.
27. What property must you set, and what method must you call in your code, in
order to bind the data from a data source to the Repeater control?
You must set the DataSource property and call the DataBind method.
30. Which property on a Combo Box do you set with a column name, prior to
setting the DataSource, to display data in the combo box?
DataTextField property.
31. Which control would you use if you needed to make sure the values in two
different controls matched?
CompareValidator control.
32. How many classes can a single .NET DLL contain?
It can contain many classes.
5. True or False: To test a Web service you must create a Windows application
or Web application to consume this service?
False, the web service comes with a test page and it provides HTTP-GET method to
test.
1. 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.
4. 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.
with prayers..........................................thomas
thomasjames_code@yahoo.co.in
pls help me
Your (excellent) example demonstrates the power of ASP in that a developer can dynamically
create HTML, XML, or even Javascript in the code-behind. As you have pointed out, this
dynamically generated code would execute on the client-side.
In short, you are correct in your assessment and appear to be able to intelligently answer this
question should you encounter it in an interview. Great question!
This is in response to Question 12, validation should occur on client side and server side both.
Client side should happen to avoid server round trip, but it's easily possible to by-pass client
side validation. Say if someone has turned of javascript in her browser or if the browser is not
supporting javascript? In that scenario client side validation will not work. Hence if the
validation is also done on server than such scenario can be avoided. The rule is whether
validation occurs on client or not, but it should always occur on server.
# re: Interview Questions: ASP.NET 7/5/2004 10:26 PM Vivek Kumbhojkar
This article is realyy good for beginners..
Excellent article
Vivek
server.transfer simply transfer execution to another page. this doesn't require any information
to be sent to the browser== it all occurs on the server without the user's knowledge.
The response.redirect method sends http information to the browser instructing it to go to
another page.
rohitkalya@yahoo.com
About question 12... the validation on client side. Yes, one should perform the validation on
client side... but as they say, *never trust your client, specially thin*.
So always perform validation on client side, try to save atleast one trip. If client is not messing
with the HTML, then he is doing a favor on himself. If he is messing, let him waste his own
band width.
To check whether all the validors on a page validate into *true*, before performing business,
you better should do...
Page.IsValid
FieldValidator.IsValid.
mEEEEEEEEEEEEEEE!!!!!!!
Thank you.
Ever Loving,
R. Senthil Kumaran
My answer will be
The Response .Redirect () method can be used to redirect the browser to specified url,
pointing to any resource and may contain query strings and causes an extra roundtrip
Server.Transfer() performs server side redirection of the page avoiding extra roundtrip.
Server.Transfer() is preferred over Response.Redirect to avoid rountrip but the limitation is the
aspx page should reside on same web server.
Thank you.
Excellent questions. I will "eventually" add them to the main list above.
Thanks!
but what iritates me at intervies and tests is that there are companies that give you as test a
small project to do. This has no relevance in my point of view. instead i prefer to test the
coding skill on paper. i usualy ask the person to write me on paper a snippet of code of 5-10
lines of code.
3. What methods are fired during the page load? Init() - when the pageis instantiated, Load()
- when the page is loaded into server memory,PreRender() - the brief moment before the page
is displayed to the user asHTML, Unload() - when page finishes loading.
4. Where does the Web page belong in the .NET Framework class
hierarchy?System.Web.UI.Page
5. Where do you store the information about the user’s locale? System.Web.UI.Page.Culture
7. What’s a bubbled event? When you have a complex control, like DataGrid, writing an event
processing routine for each object (cell, button, row, etc.) is quite tedious. The controls can
bubble up their eventhandlers, allowing the main DataGrid event handler to take care of its
constituents.
8. Suppose you want a certain ASP.NET function executed on MouseOver overa certain button.
Where do you add an event handler? It’s the Attributesproperty, the Add function inside that
property. So btnSubmit.Attributes.Add("onMouseOver","someClientCode();")
9. What data type does the RangeValidator control support? Integer,String and Date.
10. Explain the differences between Server-side and Client-side code? Server-side code runs
on the server. Client-side code runs in the clients’ browser.
11. What type of code (server or client) is found in a Code-Behind class? Server-side code.
12. Should validation (did the user enter a real date) occur server-side or client-side? Why?
Client-side. This reduces an additional request to the server to validate the users input.
13. What does the "EnableViewState" property do? Why would I want it on or off? It enables
the viewstate on the page. It allows the page to save the users input on a form.
14. What is the difference between Server.Transfer and Response.Redirect? Why would I
choose one over the other? Server.Transfer is used to post a form to another page.
Response.Redirect is used to redirect the user to another page or site.
15. Can you explain the difference between an ADO.NET Dataset and an ADO Recordset?
· 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.
16. Can you give an example of what might be best suited to place in the Application_Start
and Session_Start subroutines? This is where you can set the specific variables for the
Application and Session objects.
17. If I’m developing an application that must accommodate multiple security levels though
secure login and my ASP.NET web application is spanned across three web-servers (using
round-robin load balancing) what would be the best approach to maintain login-in state for the
users? Maintain the login state security through a database.
18. Can you explain what inheritance is and an example of when you might use it? When you
want to inherit (use the functionality of) another class. Base Class Employee. A Manager class
could be derived from the Employee base class.
19. Whats an assembly? Assemblies are the building blocks of the .NET framework. Overview
of assemblies from MSDN
20. Describe the difference between inline and code behind. Inline code written along side the
html in a page. Code-behind is code written in a separate file and referenced by the .aspx
page.
21. 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 DataSet object contents to XML. For reading database data
to an XML file to be sent to a Web Service.
22. 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.
23. Which method do you invoke on the DataAdapter control to load your generated dataset
with data? The .Fill() method
24. Can you edit data in the Repeater control? No, it just reads the information from its data
source
25. Which template must you provide, in order to display data in a Repeater control?
ItemTemplate
26. How can you provide an alternating color scheme in a Repeater control? Use the
AlternatingItemTemplate
27. What property must you set, and what method must you call in your code, in order to bind
the data from some data source to the Repeater control? You must set the DataSource
property and call the DataBind method.
28. What base class do all Web Forms inherit from? The Page class.
29. Name two properties common in every validation control? ControlToValidate property and
Text property.
30. What tags do you need to add within the asp:datagrid tags to bind columns manually? Set
AutoGenerateColumns Property to false on the datagrid tag
31. What tag do you use to add a hyperlink column to the DataGrid?
32. What is the transport protocol you use to call a Web service? SOAP is the preferred
protocol.
33. True or False: A Web service can only be written in .NET? False
34. What does WSDL stand for? (Web Services Description Language)
35. Where on the Internet would you look for Web services? (http://www.uddi.org)
36. Which property on a Combo Box do you set with a column name, prior to setting the
DataSource, to display data in the combo box? DataTextField property
37. Which control would you use if you needed to make sure the values in two different
controls matched? CompareValidator Control
38. True or False: To test a Web service you must create a windows application or Web
application to consume this service? False, the webservice comes with a test page and it
provides HTTP-GET method to test.
39. How many classes can a single .NET DLL contain? It can contain many classes.
# re: Interview Questions: ASP.NET 11/17/2004 3:47 AM Sharad
Hi I am Working in Hanu Software Systems . It will be
Good If u also Provide all the quetions through topic wise
Questions listed in the articles sounds good. I am adding more to the above mentioned list. As
many opted for some basics in .NET.
5) What are the different types of assemblies available and their purpose?
Private, Public/shared and Satellite Assemblies.
I feel the difference between "src" and "code behind" tag can be better explained from the
deployment perspective.
When "code behind" tag is used, ASP.NET expects the precompiled dll on the server. When
"src" tag is used the code behind is converted to MSIL just in time. Then it does not expect the
pre-compiled DLL. So directly the .cs (if C# is used) can be deployed on the server.
For further details Microsift msdn help - Knowledge base can be looked.
My Email id is ramjanm@gmail.com
R J Singh
subhajit.biswas@gmail.com
My Email id is pk_manikandan@rediffmail.com
P.K.MANIKANDAN
http://www.andymcm.com/dotnetfaq.htm
regards,
Santhosh.
2. How can you unload an asp.net app without touching the iis?
3. What is "delegation" in c# ?
4. in a load balancing environment, which way you choose to maintain state info, if security is
important?
5. What is the life cycle of an asp.net page? (events, from start to end)
Can u send me some more asp.net and vb.net interview questions with answers
my emailid is rathi_balu2004@yahoo.com
Thank you,
B.sharu
Can u send me some more asp.net and vb.net interview questions with answers
my emailid is prak_smile@yahoo.co.in
Thank you,
sprakash
Can anyone provide me some common questions on ASp.net which can be expected in
interview.
consider me as a beginner. pls do mail me with Ans.
My email id is get2santy@yahoo.com
btw i'd like to share some more links which might help people who are in search of .NET
questions.
http://www.hanselman.com/blog/PermaLink.aspx?guid=2d2fae59-a589-4c43-b6a5-b6
ebc1a9eafd
http://www.techinterviews.com/?p=193
http://www.geekinterview.com
answer: Its not good practice because if the control is loaded in page_load by use of
LoadControl() it will not see any of its own viewstate in onload. So if there is a textbox on the
ascx that the control needs it will not be able to see the postback data.
onload
{
string temp = textbox1.text
}
temp = ""
At the end of the onload event it will sync back up with viewstate. So in any of the userfired
events it will have the correct values.
Also anything that is not named or loaded global must be loaded before it will respond to
events on the pages round trip.
If the control is named in the html portion it will have its viewstate synced already in
pageload.
Thanking you,
Yours sincerely,
Jaineesh
Thanking you,
Yours sincerely,
Jaineesh
Ravi Goyal
vivek_harne@rediffmail.com
Vivek Harne
I need the frequently asked interview questions on asp.net, C#, webservices and remoting.
Please send to my email id. subramaniam3007@hotmail.com
Thanks
Can u send me some more .net and ASP.NET interview questions with answers
my emailid is kuttumalu@gmail.com
Thank you, renju
Regards,
Harish
I need the frequently asked interview questions and answer on VB.Net, ASP.Net, C#. Please
send to my email id. ramakant_1352@rediffmail.com.
Regards,
Ramakant Singh
I need the frequently asked interview questions and answer on VB.Net, ASP.Net, C#. Please
send to my email id. santhosh_reddy8@yahoo.com.
Thanks in advance.
If somebody have asp.net and vb.net interview questions and answers, pls send it to
rskshiva@rediffmail.com.
Thanks,
Siva R
i am new to c#.net. plz send me the frequently asked interview questions and plz guide to get
through some good company where i can explore my knowledge in .net.
i am new to c#.net. plz send me the frequently asked interview questions and plz guide to get
through some good company where i can explore my knowledge in .net.
my id is : pavan.devangam@gmail.com
i am new to ASP.net. plz send me the frequently asked interview questions and plz guide to
get through some good company where i can explore my knowledge in ASP/ASP.net.
my id is : g.c_biswas@sify.com
I am Searching for good job so please help me by giving me all the latest asp interview
quiestions
my mail ID is skd_hari@yahoo.co.in
apurva2k000@yahoo.com
thx
Even if you ask an experience professional this above questions they to answer the same and I
didn't know how you can differenciate that this answer are realated to the freshers.
With Query,
Shankar
My Mail id is
Bhaveshpatel.78@gmail.com
thank you
Please send me all the faqs on vb.net , asp.net & c#.net which might help me out in my
inteview
thanks
I need the frequently asked interview questions and answer on VB.Net, ASP.Net, C#. Please
send to my email id. pgseram@gmail.com.
2. How can you unload an asp.net app without touching the iis?
3. What is "delegation" in c# ?
4. in a load balancing environment, which way you choose to maintain state info, if security is
important?
5. What is the life cycle of an asp.net page? (events, from start to end)
with regards
thanQ
chandu
Thanks
manoj
# Interview Questions: ASP.NET 7/7/2005 2:09 AM predeep
Good Questions and answers.Send more questions and answers in kollamjayan@yahoo.com
i glad to see this questions and i benifited from this questions please send me any FAQ'S from
vb.net or asp.nte or C#
to
saicharan.m@gmail.com
Thanks
Chandan
Q. I want to programme in raw MSIL how can i do it can i use object orientation in it how will
it compile ultimately.
Q. when .NET has a built in garbage collector then is there any use defining a destructor in
any .NET class?
Happy programming....
RESPECTED SIR
AS I WAS BEGINEER IN .NET I NEED SOME QUESTIONS IN THE INTERVIEW POINT OF VIEW
My ID: sonia.khoja@gmail.com
This is realy great place for the Beginer attending interviews i am one of them.so is any one
have some collection of question in .Net and SQL Server please mail me at this ID
mal_rajesh@sify.com
Thanks
For example:
"What data types do the RangeValidator control support?
Integer, String, and Date. "
Suppose I know the answer. What does that really tell you? That I've worked with a Range
Validator before. Whoopee. Who cares?
If I don't now answer then it means that either I don't know it exists, haven't worked with it,
or more likely, simply don't remember which data types it supports. I can Google the question
and get a satisfactory answer in about 10 seconds.
When I interview, I want to know that the candidate understands deeper concepts than what
can be Googled in 30 seconds. Explain to me some particular OOP concepts. When would you
use a Singleton? Why? Why use an Interface? How would you implement exception handling in
this case? I want to know that they can THINK. Sure, I'll ask some basic questions that are
trivial during a phone screening, but asking what namespace some class out of the BCL
belongs to is just...well, stupid. It might make you feel superior if you know the answer, but it
does nothing to help you find talented programmers who can think intelligently.
Can someone explain when we inherit from HttpApplication to create a class for Global.asax,
Why do we NOT have to override Application_Start or any other event handler methods ??
Thanks
Sanket Vaidya
mail me at apurva2k000@yahoo.com
4. What does the "EnableViewState" property do? Why would I want it on or off?
EnableViewState stores the current state of the page and the objects in it like text boxes,
buttons, tables etc. So this helps not losing the state between the round trips between client
and server. But this is a very expensive on browser. It delays rendering on the browser, so you
should enable it only for the important fields/objects
5. What is the difference between Server.Transfer and
Response.Redirect? Why
would I choose one over the other?
Server.Transfer transfers the currnet context of the page to the next page and also avoids
double roundtrips. Where as Response.Redirect could only pass querystring and also requires
roundtrip.
11. What are ASP.NET Web Forms? How is this technology different than
what is available though ASP (1.0-3.0)?
ASP.NET webforms are analogous to Windows Forms which are available to most VB
developers. A webform is essentially a core container in a Page. An empty webform is nothing
but a HTML Form tag(control) running at server and posting form to itself by default, but you
could change it to post it to something else. This is a container, and you could place the web
controls, user controls and HTML Controls in that one and interact with user on a postback
basis.
13. How would you implement inheYou missed the number sequence here). Inheritance is
extending the properites, behaviour, methods to child classes from super classes. VB.NET and
C# provide single inheritance, means the subclasses can be derived from only one parent
unlike C++, where true multiple inheritance is possible. As an alternate to implement multiple
inheritance, we could do the same to implement interfaces to the parent classes and
implement the same interfaces to derive the child classesritance using VB.NET/C#?
15. Describe the difference between inline and code behind - which is
best in a
16. loosely coupled solution
5 and 16. (You missed the sequence again). Inline style is mixing the server side code and
client side code (HTML and javascript) on the same page and run it. Where as codebehind is
seperating the server side in a different page (enabling developers/coders to work) and
leaving the client side code to do the presentation only (so designers would work on it). Inline
code would be simplest way of approach because it doesn't require any pre-compilation. But it
is not good in many ways, i. You mix the presentation and server side code together so
whenever there is a change it would be tough to maintain. ii. The event processing would be a
night mare in inline code. iii. Since the codebehind needs to be compile in advance, it would be
faster unline inline, which is interpreted per call basis. In a loosely couple situation, code-
behind would be the best way to approach. Because it provides better performance.
17. Explain what a diffgram is, and a good use for one
http://msdn.microsoft.com/library/default.asp?url=/library/en-
us/sqlxml3/htm/dotnet_11pr.asp
18. Where would you use an iHTTPModule, and what are the limitations
of any
19. approach you might take in implementing one
20. What are the disadvantages of viewstate/what are the benefits
21 Describe session handling in a webfarm, how does it work and what
are the > limits
22. How would you get ASP.NET running in Apache web servers - why
would you even do this?
23. Whats MSIL, and why should my developers need an appreciation of
it if at all?
24. In what order do the events of an ASPX page execute. As a
developer is it important to undertsand these events?
25. Which method do you invoke on the DataAdapter control to load your
generated dataset with data?
26. Can you edit data in the Repeater control?
27. Which template must you provide, in order to display data in a
Repeater control?
28. How can you provide an alternating color scheme in a Repeater
control?
29. What property must you set, and what method must you call in your
code, in order to bind the data from some data source to the Repeater
control?
30. What base class do all Web Forms inherit from?
31. What method do you use to explicitly kill a user s session?
32 How do you turn off cookies for one page in your site?
33. Which two properties are on every validation control?
34. What tags do you need to add within the asp:datagrid tags to bind
columns manually?
35. How do you create a permanent cookie? Supply never to the expiration date/time
36. What tag do you use to add a hyperlink column to the DataGrid?
37. What is the standard you use to wrap up a call to a Web service
38. Which method do you use to redirect the user to another page
without performing a round trip to the client?
39. What is the transport protocol you use to call a Web service SOAP
40. True or False: A Web service can only be written in .NET
41. What does WSDL stand for?
42. What property do you have to set to tell the grid which page to go
to when using the Pager object?
43. Where on the Internet would you look for Web services?
44. What tags do you need to add within the asp:datagrid tags to bind
columns manually.
45. Which property on a Combo Box do you set with a column name, prior to setting the
DataSource, to display data in the combo box?
46. How is a property designated as read-only?
47. Which control would you use if you needed to make sure the values
in two different controls matched?
48. True or False: To test a Web service you must create a windows
application or Web application to consume this service?
49. How many classes can a single .NET DLL contain?
1 Describe session handling in a webform, how does it work and what
are the its limits
.NET proposes a new way to handle this using a stateserver (actually a trimmed down sql
server)
storing the web session data in a factory configured database schema or using Database with
your own
schema defined to handle the sessions.
2. How would you get ASP.NET running in Apache web servers - why
would you even do this?
You need to create a CLRHost, which hosts the CLR (ASP.NET) on top of Apache.
Since Apache is #1 webserver used by many companies, this would allow more number of web
site owners
to take advantage of ASP.NET and its richness.
.NET supports more than 21 language (I think 24 now). They compile to IL first and then this
IL would get JITted to Native
code at runtime. Learning IL is advantageous in many terms. The important one is sometimes
you need to optimize your
code, so you could disassemble your compile assembly using ILDASM and tweak your code
and re assemble it using ILASM.
Out of all the Page_Load is the one where your code gets loaded and your magic should be
written. page_init
occurs only once, i.e. when the page is initially created.
As a developer you need to know these, becuase your development activity is coding for these
only.
Use AlternatingItemTemplate
9. What property must you set, and what method must you call in your
code, in order to bind the data from some data source to the Repeater
control?
System.Web.UI.Page
Session.Abandon
12 How do you turn off cookies for one page in your site?
Actually I never did this. But there should be a way to do this. May be need to
write your own code to do this using Response.Cookies collection and HTTPCookie class and
also SessionStateMode. Or there may be some simple way to do it. Need to do further
research on this.
14. What tags do you need to add within the asp:datagrid tags to bind
columns manually?
If you are developing web services and the cookies need to be travelled across multiple
requests, then
you need to have permanent or persistant cookie.
In order to do this, you have to set the your webserivce CookieContainer to a newly created
CookieContainer, and the
its cookie to a session value and then store the cookie(s) into the Service CookieCollection
from that cookie container
if something is there othere wise add cookie to the container.
16. What tag do you use to add a hyperlink column to the DataGrid?
HyperLinkColumn
17. What is the standard you use to wrap up a call to a Web service
SOAP.
18. Which method do you use to redirect the user to another page
without performing a round trip to the client?
Server.Transfer
Response.Redirect also does that but it requires round trip between client and server.
19. What is the transport protocol you use to call a Web service SOAP
SOAP
20. True or False: A Web service can only be written in .NET
False.
21. What does WSDL stand for?
Web Services Description Language.
22. What property do you have to set to tell the grid which page to go
to when using the Pager object?
CurrentPageIndex. You need to set this one with the DataGridPageChangedEventArgs'
NewPageIndex.
23. Where on the Internet would you look for Web services?
UDDI.org, UDDI.Org (even microsoft maintains a uddi server-- http://uddi.microsoft.com)
UDDI is Universal Description, Discovery and Integration of Web Services.
The UDDI servers serves as yellow pages to WebServices (visit http://www.uddi.org)
24. What tags do you need to add within the asp:datagrid tags to bind
columns manually.
25. Which property on a Combo Box do you set with a column name, prior to setting the
DataSource, to display data in the combo box?
ListItem.
ex:
public class abc
{
private string stringIt="This is the string";
public string StringIt
{
get
{
return stringIt;
}
}
}
But you could set an attribute prior to the property name with [ReadOnly="true"],
if that property defined an attribute
27. Which control would you use if you needed to make sure the values
in two different controls matched?
Use CompareValidator
28. True or False: To test a Web service you must create a windows
application or Web application to consume this service?
False. The webservice comes with a test page and it provides HTTP-GET method to test.
And if the web service turned off HTTP-GET for security purposes then you need to create
a web application or windows app as a client to this to test.
many is correct. Yes an assembly can contain one or more classes and an assembly can
be contained in one dll or could spread across multiple dlls. too. Take System.dll, it is
collections of so many classes.
2. What is CLR ? 2.1. Diff between CLR & CTS
3. Trace and Debug belongs to which namespaces?
4. ColumnMapping belongs to which namespaces?
5. In order to get assembly info whcih namespace we should import?
6. DIff. between Friend and Protected Friend.
7. What is an abstract class?
8. What is diff. between abstract class and an interface?
· what is shadowing ?
· Overloading allows a subclass to add a new variation of a method. As long as the new
variation has a different method signature, it can have the same name as an existing method
on the base class. Shadowing, on the other hand, entirely replaces all variations of the method
from the base class, leaving the subclass with only a single version of the method—the one we
created through shadowing. Shadowing does not extend an interface, but rather replaces
existing methods.
Overriding allows a subclass to alter or replace an existing method with the permission of the
base class designer. Shadowing can be done without the permission of the base class designer,
which is a risky proposition and one that requires extensive testing because the base class was
never designed with such a thing in mind.
Also, as we discussed earlier, overriding uses virtual methods so the implementation of the
method that is invoked is based on the data type of the underlying object, not the data type of
the variable we're using. When a method is shadowed it is not virtual, and it is the data type
of the variable that dictates the implementation of the method that will be used. The data type
of the underlying object is ignored.
http://msdn.microsoft.com/library/default.asp?url=/library/en-
us/dnadvnet/html/vbnet12252001.asp
· * diff between Overriding and overloading
9. How do u declare static variable and how it is declared and what is its lifetime? 10. Diff
between Dataset and Datareader?
11. How do u get record no from 5 to 15 from a dataset of 100 records.
12. diff. betn Dataset and Recordset.
13. why Datareader is useful?
14. How do u call and execute a SP in .NET?
15. What is DLL hell?
16. what is versioning in .NET?
17. What r the ASP.NET list controls and diff. between them?
18. What is diff. betn ASP State Management and ASP.NET State Management?(Imp)
19. How can we pass info. between 2 asp.net pages?
20. Diff betn Web User Control and Web Custom Control
21. What is an indexed property?
22. i've 2 buttons on an asp.net page(.aspx). i wanna execute same routine clicking on 2
buttons.how?
23. How do we Sort the data from a Dataset?
24. how do we get only edited/deleted/inserted records from a Dataset?
25. how Dataadapter.fill works?
26. how can we implement a Identity (SQL Server) call in an asp.net page?
27. What is Viewstate?
28. What is the life cycle of an asp.net page?
1. What does the keyword static mean when applied to a class member?
1. It means the method can be called through the class without instantiating the class.
2. Declare a method called calculate that takes one integer, adds one and returns the result.
Allow this method to be overridden by an inheriting class.
2.
Public virtual int calculate(int value)
{
newValue = value + 1;
return newValue;
}
value++;
return value;
4. You can instantiate a class but you cannot instantiate an interace you can only offer the
functionality of that interface.
5. What are the .Net web authentication options and which one would generally be used for a
secured/public site?
5. None
Windows Authentication –Secured side
IIS Authentication
Forms Authentication – Public Side
7. What is a Singleton?
7. This ensures that a class can only be instantiated once.
Using the EMPLOYEE and JOBS tables, fill in the following stored procedure template so that it
removes a job by job_id and all associated employees ensuring that both updates succeed or
fail together.
BEGIN
BEGIN TRAN
IF EXISTS (SELECT * FROM JOBS WHERE job_id = @jobid)
DELETE FROM JOBS WHERE job_id = @jobid
IF @@ERROR <> 0
BEGIN
RAISERROR(‘Could not delete row from Jobs – Abort’, 16,1)
GOTO Errorhandler
END
IF EXISTS(SELECT * FROM EMPLOYEES WHERE job_id = @jobid)
DELETE FROM EMPLOYEES
WHERE job_id = @jobid
IF @@ ERROR <> 0
BEGIN
RAISERROR(‘Could not delete row from Employees – Abort’, 16,1)
GOTO Errorhandler
END
COMMIT
RETURN
Errorhandler:
ROLLBACK TRAN
RETURN
END
You could also ask him what situations to use a datareader in, when to use a dataset etc... for
ado.net
In general they will be questions bascially on the SQL Server management, what kind of
different services it provides. what the replication methods used. They will give you a situation
where you have to choose which type of SQL sever edition you have to use. (there are 7).
About ADO.NET, they will give some senario and ask you to use the appropriate methods like
sort,filter, row state enumeration and all
A finally block can not have with break; continue; return or goto statements
Hi Friends,
I know some of the answers.... but i want to recheck it... Please give me the correct
answers... or any links where i can study abt these...
2. What is CLR ?
8. What is diff. between abstract class and an interface? * what is shadowing ? * diff between
Overriding and overloading
9. How do u declare static variable and how it is declared and what is its lifetime?
13. why Datareader is useful? 14. How do u call and execute a SP in .NET?
17. What r the ASP.NET list controls and diff. between them?
18. What is diff. betn ASP State Management and ASP.NET State Management?(Imp)
19. How can we pass info. between 2 asp.net pages? 20. Diff betn Web User Control and Web
Custom Control.
22. i've 2 buttons on an asp.net page(.aspx). i wanna execute same routine clicking on 2
buttons.how?
26. how can we implement a Identity (SQL Server) call in an asp.net page?
Thanks
1. System
2. Common Language Runtime
2.1.
CLR - The common language runtime is the execution engine for .NET Framework applications.
CTS - The common type system is a rich type system, built into the common language
runtime, that supports the types and operations found in most programming languages. The
common type system supports the complete implementation of a wide range of programming
languages.
3. System.Diagnostics
4. System.Data.Common
5. System.Reflection
6.
Protected - Available only to classes that inherit from our class.
Friend - Available only to code within the project/component.
Protected Friend - Available only to classes that inherit from our class (in any project) or to
code within our project/component. This is a combination of Protected and Friend.
7. Abstract classes cannot be instantiated they can only be extended. You call the functionality
of the abstract class without having to create an instance of it.
8.
a) Interfaces don't have implementation and abstract classes can be partially implemented.
From a practical point of view, interfaces can be implemented in any class and more than one
interface can be implemented in a class, but abstract classes can only be implemented in the
same class hierarchy (subclassing) and only one abstract class can be implemented in a class.
b) Basically it's an mixture of non-virtual methods and method hiding. That is, in VB.NET
overriding methods never hide while non-overriding methods always do.
c)
Overloading a method means that you are providing another version of an existing method
that takes different input arguments/parameters. The method will have the same name as an
existing method and may or may not have a different return type. It must have a different
number and/or type of input parameters. Methods are identified by their name, and number
and type of arguments. This is known as the method's signature. The return value of a method
is not regarded as part of the signature. Overloading can be done within the same class i.e.
you can have several methods defined in one class that have the same name, but different
arguments, or it can be done in a class related to another by inheritance i.e. the superclass
contains one method, and a subclass provides another version of the method with the same
name and different arguments.
Overriding a method means that you are replacing the method with your own version. The
overriding method must be defined identically to the method being replaced. Overriding can
only be done in inherited classes i.e. the superclass provides a method and the subclass
redefines the method with one that has exactly the same name and arguments as the
superclass version. This will cause the method to behave differently when it is called by an
object of the subclass, to when it is called by an object of the superclass.
9.
Has application scope...variable only goes out of scope when the application ends.
code:
The dataset can be used like an in memory representation of the database. You can use
DataViews to filter and sort records for presentation. You can also establish relationships with
the dataRelation object. You can use the dataset with a data adapter to update the database.
These objects can keep track of changes and original values. When updating the database
these objects can help to resolve conflicts or concurrency issues.
11.
Now, I'm tired...You can find the answers to all of these questions...If you really want to.
__________________
"When that first bullet goes past your head, politics goes right out the window." Eric Bana -
Black Hawk Down
My mail Id is narasimha_nandu@yahoo.com
The basic thing is nobody knows what to study [what are the important topics to focus, how to
study for the interview....[ we never know what Q would come from the interviewer] . Me
too..Thats the reason i am here.
By just going through the questions and answerers you can not win.
All you need to do is once you done reading the particular topic for eg. ADO.Net, then search
for questions and see if you could answer.
Or just don't read the answer and try to remember that. Read that topic fully and try to
understand.
I got some basic questions, may seem very easy but try to answer [try to tell out loud in 3 or
4 lines] with out googling
1. What is HTML ?
2. What is XML ?
3. What is the difference between a class and struct ?
4. What is the difference between a Get and a Post ?
5. What is a managed code ?
6. int n *=2; int x = n & 1; What is the value of x ?
7. What is a friend in C++ ?
Linked List:
? They allow a new element to be inserted or deleted at any position in a constant number of
operations (changing some references) O(1).
? Easy to delete a node (as it only has to rearrange the links to the different nodes)., O(1).
? To find the nth node, will need to recurse through the list till it finds [linked lists allow only
sequential access to elements. ], O(n)
Array
? Insertion or deletion of element at any position require a linear (O(n)) number of operations.
? Poor at deleting nodes (or elements) as it cannot remove one node without individually
shifting all the elements up the list by one., O(n)
? Poor at inserting as an array will eventually either fill up or need to be resized, an expensive
operation that may not even be possible if memory is fragmented. Similarly, an array from
which many elements are removed may become wastefully empty or need to be made smaller,
O(n)
? easy to find the nth element in the array by directly referencing them by their position in the
array.[ arrays allow random access ] , O(1)