Monday, March 8, 2010

ASP.NET Questions

# What base class do all Web Forms inherit from? System.Web.UI.Page
# What method do you use to explicitly kill a user’s session?
The Abandon method destroys all the objects stored in a Session object and releases their resources.
If you do not call the Abandon method explicitly, the server destroys these objects when the session times out.
Syntax: Session.Abandon
# How do you turn off cookies for one page in your site?
Use the Cookie.Discard Property which Gets or sets the discard flag set by the server. When true, this property instructs the client application not to save the Cookie on the user’s hard disk when a session ends.
# Which two properties are on every validation control? ControlToValidate & ErrorMessage properties
# What tags do you need to add within the asp:datagrid tags to bind columns manually?
# How do you create a permanent cookie?
Setting the Expires property to MinValue means that the Cookie never expires.
# What tag do you use to add a hyperlink column to the DataGrid?
# What is the standard you use to wrap up a call to a Web service?
# Which method do you use to redirect the user to another page without performing a round trip to the client?
Server.transfer()
# What is the transport protocol you use to call a Web service?
SOAP. Transport Protocols: It is essential for the acceptance of Web Services that they are based on established Internet infrastructure. This in fact imposes the usage of of the HTTP, SMTP and FTP protocols based on the TCP/IP family of transports. Messaging Protocol: The format of messages exchanged between Web Services clients and Web Services should be vendor neutral and should not carry details about the technology used to implement the service. Also, the message format should allow for extensions and different bindings to specific transport protocols. SOAP and ebXML Transport are specifications which fulfill these requirements. We expect that the W3C XML Protocol Working Group defines a successor standard.
# True or False: A Web service can only be written in .NET. False.
# What does WSDL stand for? Web Services Description Language
# What property do you have to set to tell the grid which page to go to when using the Pager object?
# 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.
# What tags do you need to add within the asp:datagrid tags to bind columns manually?
Column tag and an ASP:databound tag.
# 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?
# How is a property designated as read-only?
In VB.NET:
Public ReadOnly Property PropertyName As ReturnType
Get          ‘Your Property Implementation goes in here
End Get
End Property
in C#
public returntype PropertyName
{
get{
//property implementation goes here
}
// Do not write the set implementation
}
# Which control would you use if you needed to make sure the values in two different controls matched?
Use the CompareValidator control to compare the values of 2 different controls.
# True or False: To test a Web service you must create a windows application or Web application to consume this service? False.

# How many classes can a single .NET DLL contain?
Unlimited.

No comments:

Post a Comment