April 30, 2013

ASP.NET Interview Questions and Answers

How can you send an email message from an ASP.NET Web page?
Ans- You can use the System.Net.Mail.MailMessage and the System.Net.Mail.SmtpMail classes to send an email in your Web pages. In order to send an email through your mail server, you need to create an object of the SmtpClient class and set the server name, port, and credentials.


What is the difference between the Response.Write() and Response.Output.Write() methods?
Ans- The Response.Write() method allows you to write the normal output; whereas, the Response.Output.Write() method allows you to write the formatted output.


Differentiate between client-side and server-side validations in Web pages.
Ans- Client-side validations take place at thehttp://www.blogger.com/blogger.g?blogID=1100445556152057720#editor/target=post;postID=7962939421597285574 client end with the help of JavaScript and VBScript before the Web page is sent to the server. On the other hand, server-side validations take place at the server end.


What is the default timeout for a Cookie?
Ans- The default time duration for a Cookie is 30 minutes.

What are the events that happen when a client requests an ASP.NET page from IIS server?
Ans- The following events happen when a client requests an ASP.NET page from the IIS server:

  1. User requests for an application resource.
  2. The integrated request-processing pipeline receives the first user request.
  3. Response objects are created for each user request.
  4. An object of the HttpApplication class is created and allocated to the Request object.
  5. The HttpApplication class processes the user request. 

Explain file-based dependency and key-based dependency.
Ans- In file-based dependency, you have to depend on a file that is saved in a disk. In key-based dependency, you have to depend on another cached item.


How can you implement the postback property of an ASP.NET control?
Ans- You need to set the AutoPostBack property to True to implement the PostBack property of controls.

0 comments:

Post a Comment

  • Blogger news

    This Blog Contains All Topics Related To Internet, Website Help, Interview Questions, News, Results From Various Resources, Visit Daily For More Interesting And Famous Topics.
  • Random Post

  • About

    We Provide All Information Which you Needed. We Maintain This Blog Very Carefully, If You Find Any Mistake or Any Suggestions Then Please Let Us Know, You Can Contact Us By Comments, On FB Page Or On Google+ Page. ~ Thank You