ASP .Net

Asp.Net Faqs, Asp.Net interview questions,

Describe the advantages of writing a managed code application instead of unmanaged one. What’s involved in certain piece of code being managed?

The advantages include automatic garbage collection, memory management, support for versioning and security. These advantages are provided through .NET FCL and CLR, while with the unmanaged code similar capabilities had to be implemented through third-party libraries or as a part of the application itself.

What is the standard you use to wrap up a call to a Web service?

We use Soap standard to wrap calls to web service.Soap stands for Simple Object Access Protocol.

True or False: A Web service can only be written in .NET.

False.

What does WSDL stand for?

Web Services Description Language

Where on the Internet would you look for Web services?

UDDI repositaries like uddi.microsoft.com, IBM UDDI node, UDDI Registries in Google Directory, enthusiast sites like XMethods.net.

True or False: A Web service can only be written in .NET?

False

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”,”someClientCod e();”)

What is the use of Request.MapPath()?

Request.MapPath() is used to convert virtual path to physical path. Virtual path is path understood by your web server. For example, web server understands /photo/logo.jpg. But that is not understood by OS so convert this to physical path using Request.MapPath(). For example FileUpload control’s SaveAs() method expects physical path so the following converts virtual path to physical path.

FileUpload1.SaveAs( Request.MapPath(“photos/logo.jpg”));

What is AutoPostBack property? How is it difference from IsPostBack property?

AutoPostBack is a property to cause postback for controls (such as dropdownlist and checkbox) that otherwise do not cause postback. Set this property to true to make dropdownlist to cause postback when user selects a diffent item in the dropdownlist. IsPostBack is a property of Page class,which returns true if page is called because of postback.

What events fire when a page life cycle?

The following major events occurs in the life cycle of a page. PreInit Init InitComplete PreLoad Load LoadComplete PreRender SaveStateComplete Render Unload For more details regarding page life cycle, see article in msdn