ASP.Net Basic Questions

Here Iam sending ASP.Net basic questions

1. Explain the differences between Server-side and Client-side code?
Server side code is executed at server(Like vbscript)
Client side code is executed at client(like javascript)


2. What type of code (server or client) is found in a Code-Behind
class?

Server side


3. Should validation (did the user enter a real date) occur
server-side or client-side? Why?

It occurs on Client-side (we should not validate at server round trip is wasted)



4. What does the "EnableViewState" property do? Why would I want it on or off?

EnableViewState enable to maintain the state of servercontrols


5. What is the difference between Server.Transfer and
Response.Redirect? Whywould I choose one over the other?

Server.Transfer is which transfers execution of one page.
Response.Redirect makes the browser to rqeust the specified page which wastes round-trip from
server- browser -server.

prefer server.transfer.



8. Can you explain the difference between an ADO.NET Dataset and an
ADO Recordset?

Ado Record set consists of records(Rows) and fields(columns)
An ADO.NET DataSet contains a collection of zero or more tables represented by DataTable objects.
The DataSet is the core component of the disconnected architecture of ADO.NET. The DataSet is explicitly designed for data access independent of any data source. As a result it can be used with multiple and differing data sources, XML data, or used to manage data local to the application. The DataSet contains a collection of one or more DataTable objects made up of rows and columns of data, as well as primary key, foreign key, constraint and relation information about the data in the DataTable objects.
ADO.NET is an evolutionary improvement to Microsoft ActiveX Data Objects (ADO). It is a standards-based programming model for creating distributed, data-sharing applications.


9. Can you give an example of what might be best suited to place in
the Application_Start and Session_Start subroutines?
Application_start is used to track the status of Application level
Session start is used to maintain status of each user.


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 Event-based programming model and not interperted

Asp is interpreter


12. How does VB.NET/C# achieve polymorphism?

overloading and overriding.


11. Can you explain what inheritance is and an example of when you
might use it?

when webform is created it is inherited from page.



15. Describe the difference between inline and code behind - which is
best in a loosely coupled solution
Inline code is written in .aspx page within the <% %> tags. This would run the page in an interpreted mode.
Code written in the Code-Behind Class would be run in a compiled mode. This is a better approach as the code would be separted from the interface elements.


20. What are the disadvantages of viewstate/what are the benefits
ViewState is maintained in an encoded format in the form of a hidden field in the web page. This is automatically decoded by asp.net and is used to retain the contents of the web controls on postback


21 Describe session handling in a webfarm, how does it work and what
are the limits
Using Session object to store the user state increases the load on the server as the state is maintained at the server. This would prove to be a burden on the server when the number of users accessing the site increase.
Also, in a web farm environment, multiple web servers are used to send data to the requesting user. In this case, since a Session is maintained at one web server, distributing the session information across multiple web servers is not viable.


23. Whats MSIL, and why should my developers need an appreciation of
it if at all?
Microsoft intermediate Language

24. In what order do the events of an ASPX page execute. As a developer is it important to undertsand these events?
yes..net is event driven model.


25. Which method do you invoke on the DataAdapter control to load your generated dataset with data?
ds.fill()


26. Can you edit data in the Repeater control?
No. This control is used to display repeating data in a table


30. What base class do all Web Forms inherit from?
Page

31. What method do you use to explicitly kill a user's session?
Session.Abandon()


33. Which two properties are on every validation control?
1.ControltoValidate
2.ErrorMessage
3.Enable
4.Enabledviewstate

Answer: 1 and 2


34. What tags do you need to add within the asp:datagrid tags to bind
columns manually?
databind

35. How do you create a permanent cookie?
Reponse.Cookies("Cookiename") = "test"
Response.Cookies("Cookiename").Expires = Now() + 10 (Cookie expires in 10 years)


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
SOAP (simple object access protocol)

38. Which method do you use to redirect the user to another page
without performing a round trip to the client?
server.transfer

39. What is the transport protocol you use to call a Web service SOAP
Http


41. What does WSDL stand for?
webservice description language


42. What property do you have to set to tell the grid which page to go
to when using the Pager object?
CurrentPageIndex

43. Where on the Internet would you look for Web services?
UDDI Universal Description Discovery And Integration registry


44. What tags do you need to add within the asp:datagrid tags to bind
columns manually.
Need to add template columns

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?
DataText
DataValue


46. How is a property designated as read-only?
Enabled


47. Which control would you use if you needed to make sure the values
in two different controls matched?
CompareValidator


48. True or False: To test a Web service you must create a windows
application or Web application to consume this service?
True

49. How many classes can a single .NET DLL contain?
Any number of classes


Comments

No responses found. Be the first to comment...


  • Do not include your name, "with regards" etc in the comment. Write detailed comment, relevant to the topic.
  • No HTML formatting and links to other web sites are allowed.
  • This is a strictly moderated site. Absolutely no spam allowed.
  • Name:
    Email: