Monday, November 21, 2011

ASP.NET Quiz

  1. Explain the benefits of .NET framework in your own term?
  2. What are the major components of .NET framework?
  3. What is the role of Common Language Runtime (CLR)?
  4. How do you relate asp with asp.net?
  5. State the difference between these Html tags:
a)      <div id=”x1” runat=”server” ></div>
b)      <div id=”x1” ></div>
  1. How a web server handles the following files (explain):
a)      first.html
b)      first.aspx

  1. Compare and contrast server side and client side validation?
  2. Validate an age input box, age should be in the range 25-35
  3. Why rich controls are named so?
  4. What is the use of MultiView control?
Ans: To break up a long data collection form (or any other related content) within the same page, use MultiView control. Read this article of mine about How to Use MultiView Control
  1.  Validate the following text box: accept only alphabetic input <asp:TextBox id=”txt1” runat=”server” />
  2. List and describe the types of Server controls.
Ans: We’ve two types of server controls in asp.net which are
  1. How can you send a user to a new page in asp.net? Describe the different methods available and their differences.
Ans:
·         By using html anchor tag <a href=”page2.aspx”>Go to page 2</a>
·         By using asp.net hyperlink control <asp:HyperLink id=”hlk1” runat=”server” navigateUrl=”page2.aspx”>Go to page 2</asp:HyperLink>
·           For more please refer User Redirection article on this blog
  1. Pages or web forms exchange data or information. How this happens? State at least one method and how to use it.
Ans:
·        QueryString
·         Session
·         Application
·        Cookies
etc
  1. Http is stateless (i.e: page state is lost every time a page is posted back). How does asp.net overcome this fact?
Ans: By using a hidden control known as viewState which saves the contents of all controls in the page and bring back the content to the newly created page after postback.
  1. Why do you think Html server controls are included in asp.net while we’ve got their powerful counterparts?
   Ans: For backward compatibility. If you have an already existing html page you can simply convert it into an asp.net web form by converting the html elements into html server controls.

  1. List the benefits of using Master pages.
Ans:
·         Centralizes the look and feel of pages
·         Reduces code
·         Minimizes errors
·         Can be used to control access to pages
·         More about Master pages follow this link Master Pages
download doc

No comments:

Post a Comment

Search This Blog (raadi)